<!DOCTYPE html>
<!-- saved from url=(0058)https://blog.csdn.net/mutian6655/article/details/117816542 -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <link rel="canonical" href="https://blog.csdn.net/mutian6655/article/details/117816542">
    
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content="{&quot;pid&quot;: &quot;blog&quot;, &quot;spm&quot;:&quot;1001.2101&quot;}">
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp"><link rel="alternate" media="handheld" href="https://blog.csdn.net/mutian6655/article/details/117816542#">
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link href="https://g.csdnimg.cn/static/logo/favicon32.ico" rel="shortcut icon" type="image/x-icon">
    <title>JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存</title>
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/f.txt"></script><script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/f(1).txt" id="google_shimpl"></script><script type="text/javascript" async="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/auto_dup"></script><script type="text/javascript" charset="utf-8" async="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/apiaccept"></script><script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/push.js.下载"></script><script type="text/javascript" async="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/saved_resource(1)"></script><script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/hm.js.下载"></script><script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/push.js(1).下载" id="ttzz"></script><script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="jvm无法分配内存">
        <meta name="csdn-baidu-search" content="{&quot;autorun&quot;:true,&quot;install&quot;:true,&quot;keyword&quot;:&quot;jvm无法分配内存&quot;}">
    <meta name="description" content="JVM -Xmx内存设置超过物理内存问题思考文章目录JVM -Xmx内存设置超过物理内存问题思考问题提出理论思考1. 是否可以设置`-Xmx`超过物理内存？2. 是否可以将`-Xmx`设置的无限大？3. 当物理机内存耗尽时，会发生什么现象？4. JVM在堆内存不足和物理内存耗尽时会发生什么？5. JVM会因为临近物理内存大小而发生GC吗问题验证测试代码测试Xmx最大值WindowsLinux测试内存溢出开启SWAP情况下关闭SWAP情况下测试GC现象关闭Swap打开Swap其他说明问题提出JVM是否可">
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/blog.js.下载" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/detail_enter-d9aa713720.min.css">
    <style>
        #content_views pre{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
        #content_views pre code{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
    </style>
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/mutian6655/article/details/117816542","appid":"1638831770136827","pubDate":"2021-06-11T14:32:30","title":"JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存","upDate":"2021-06-11T14:35:42"}</script>
        <link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/skin3-template-762f7595fd.min.css">
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/jquery-1.9.1.min.js.下载" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;//注释删除enterprise
        var username =  "mutian6655";
        var skinImg = "white";
        var blog_address = "https://blog.csdn.net/mutian6655";
        var currentUserName = "";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/mutian6655/article/details/117816542";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile.csdnimg.cn/5/A/7/3_mutian6655";
        var articleTitle = "JVM -Xmx内存设置超过物理内存问题思考";
        var articleDesc = "JVM -Xmx内存设置超过物理内存问题思考文章目录JVM -Xmx内存设置超过物理内存问题思考问题提出理论思考1. 是否可以设置`-Xmx`超过物理内存？2. 是否可以将`-Xmx`设置的无限大？3. 当物理机内存耗尽时，会发生什么现象？4. JVM在堆内存不足和物理内存耗尽时会发生什么？5. JVM会因为临近物理内存大小而发生GC吗问题验证测试代码测试Xmx最大值WindowsLinux测试内存溢出开启SWAP情况下关闭SWAP情况下测试GC现象关闭Swap打开Swap其他说明问题提出JVM是否可";
        var articleTitles = "JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存";
        var nickName = "明谨";
        var articleDetailUrl = "https://blog.csdn.net/mutian6655/article/details/117816542";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
        var isShowConcision = false;
        var isCookieConcision = false
        var isHasDirectoryModel = false
        var isShowSideModel = false
        var isShowDirectoryModel = true
        function getCookieConcision(sName){
            var allCookie = document.cookie.split("; ");
            for (var i=0; i < allCookie.length; i++){
                var aCrumb = allCookie[i].split("=");
                if (sName == aCrumb[0])
                    return aCrumb[1];
            }
            return null;
        }
        if (getCookieConcision('blog_details_concision') && getCookieConcision('blog_details_concision') == 0){
            isCookieConcision = true
            isShowSideModel = true
            isShowDirectoryModel = false
        }
    </script>
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/saved_resource(2)" type="text/javascript"></script>
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/report.js.下载" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/ds.js.下载"></script>
<link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/csdn-toolbar-default.css"><script type="text/javascript" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/csdn-notification.js.下载"></script><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-login.css"><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/collection-box.css"><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-tooltip.css"><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-medal.css"><style type="text/css">.hljs-ln{border-collapse:collapse}            .hljs-ln td{padding:0}            .hljs-ln-n{text-align: right;padding-right: 8px;}            .hljs-ln-n:before{content:attr(data-line-number)}</style><style type="text/css">pre{position: relative}pre:hover .code-full-screen{display:none !important;}.code-full-screen{display: none !important;position: absolute;right: 4px;top: 3px;width: 24px !important;height: 24px !important;margin: 4px !important;}pre:hover .hljs-button{display: block}.hljs-button{display: none;position: absolute;right: 4px;top: 4px;font-size: 12px;color: #ffffff;background-color: #9999AA;padding: 2px 8px;margin: 8px;border-radius: 4px;cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.05);}.hljs-button:after{content: attr(data-title)}code .hljs-button{margin: 2px 8px;}</style><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-accusation.css"><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-ordertip.css"><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/order-payment.css"><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/side-toolbar.css"><link rel="stylesheet" type="text/css" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/csdn-footer.css"><meta http-equiv="origin-trial" content="AxujKG9INjsZ8/gUq8+dTruNvk7RjZQ1oFhhgQbcTJKDnZfbzSTE81wvC2Hzaf3TW4avA76LTZEMdiedF1vIbA4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0="><meta http-equiv="origin-trial" content="Azuce85ORtSnWe1MZDTv68qpaW3iHyfL9YbLRy0cwcCZwVnePnOmkUJlG8HGikmOwhZU22dElCcfrfX2HhrBPAkAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A16nvcdeoOAqrJcmjLRpl1I6f3McDD8EfofAYTt/P/H4/AWwB99nxiPp6kA0fXoiZav908Z8etuL16laFPUdfQsAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="AxBHdr0J44vFBQtZUqX9sjiqf5yWZ/OcHRcRMN3H9TH+t90V/j3ENW6C8+igBZFXMJ7G3Pr8Dd13632aLng42wgAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A88BWHFjcawUfKU3lIejLoryXoyjooBXLgWmGh+hNcqMK44cugvsI5YZbNarYvi3roc1fYbHA1AVbhAtuHZflgEAAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjUyNzc0NDAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="AzoawhTRDevLR66Y6MROu167EDncFPBvcKOaQispTo9ouEt5LvcBjnRFqiAByRT+2cDHG1Yj4dXwpLeIhc98/gIAAACFeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A6+nc62kbJgC46ypOwRsNW6RkDn2x7tgRh0wp7jb3DtFF7oEhu1hhm4rdZHZ6zXvnKZLlYcBlQUImC4d3kKihAcAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A/9La288e7MDEU2ifusFnMg1C2Ij6uoa/Z/ylwJIXSsWfK37oESIPbxbt4IU86OGqDEPnNVruUiMjfKo65H/CQwAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><style type="text/css">.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Menu_Button .MathJax_Hover_Arrow {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; font-family: 'Courier New',Courier; font-size: 9px; color: #F0F0F0}
.MathJax_Menu_Button .MathJax_Hover_Arrow span {display: block; background-color: #AAA; border: 1px solid; border-radius: 3px; line-height: 0; padding: 4px}
.MathJax_Hover_Arrow:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_Hover_Arrow:hover span {background-color: #CCC!important}
</style><style type="text/css">#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_About.MathJax_MousePost {outline: none}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 2px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 2px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; padding-top: .25em; color: #666666; font-size: .75em}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: 1em}
.MathJax_MenuRadioCheck.RTL {right: 1em; left: auto}
.MathJax_MenuLabel {padding: 2px 2em 4px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #CCCCCC; margin: 4px 1px 0px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: Highlight; color: HighlightText}
.MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus {background-color: #E8E8E8}
.MathJax_ContextMenu:focus {outline: none}
.MathJax_ContextMenu .MathJax_MenuItem:focus {outline: none}
#MathJax_AboutClose {top: .2em; right: .2em}
.MathJax_Menu .MathJax_MenuClose {top: -10px; left: -10px}
.MathJax_MenuClose {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; font-family: 'Courier New',Courier; font-size: 24px; color: #F0F0F0}
.MathJax_MenuClose span {display: block; background-color: #AAA; border: 1.5px solid; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; line-height: 0; padding: 8px 0 6px}
.MathJax_MenuClose:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_MenuClose:hover span {background-color: #CCC!important}
.MathJax_MenuClose:hover:focus {outline: none}
</style><style type="text/css">.MathJax_Preview .MJXf-math {color: inherit!important}
</style><style type="text/css">.MJX_Assistive_MathML {position: absolute!important; top: 0; left: 0; clip: rect(1px, 1px, 1px, 1px); padding: 1px 0 0 0!important; border: 0!important; height: 1px!important; width: 1px!important; overflow: hidden!important; display: block!important; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}
.MJX_Assistive_MathML.MJX_Assistive_MathML_Block {width: 100%!important}
</style><style type="text/css">#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style><style type="text/css">.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1em; bottom: 1.5em; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style><link rel="preload" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/f(2).txt" as="script"><script type="text/javascript" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/f(2).txt"></script><style type="text/css">.MJXp-script {font-size: .8em}
.MJXp-right {-webkit-transform-origin: right; -moz-transform-origin: right; -ms-transform-origin: right; -o-transform-origin: right; transform-origin: right}
.MJXp-bold {font-weight: bold}
.MJXp-italic {font-style: italic}
.MJXp-scr {font-family: MathJax_Script,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-frak {font-family: MathJax_Fraktur,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-sf {font-family: MathJax_SansSerif,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-cal {font-family: MathJax_Caligraphic,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-mono {font-family: MathJax_Typewriter,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-largeop {font-size: 150%}
.MJXp-largeop.MJXp-int {vertical-align: -.2em}
.MJXp-math {display: inline-block; line-height: 1.2; text-indent: 0; font-family: 'Times New Roman',Times,STIXGeneral,serif; white-space: nowrap; border-collapse: collapse}
.MJXp-display {display: block; text-align: center; margin: 1em 0}
.MJXp-math span {display: inline-block}
.MJXp-box {display: block!important; text-align: center}
.MJXp-box:after {content: " "}
.MJXp-rule {display: block!important; margin-top: .1em}
.MJXp-char {display: block!important}
.MJXp-mo {margin: 0 .15em}
.MJXp-mfrac {margin: 0 .125em; vertical-align: .25em}
.MJXp-denom {display: inline-table!important; width: 100%}
.MJXp-denom > * {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-script-box > *  {display: table!important; height: 50%}
.MJXp-script-box > * > * {display: table-cell!important; vertical-align: top}
.MJXp-script-box > *:last-child > * {vertical-align: bottom}
.MJXp-script-box > * > * > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
.MathJax_PHTML .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style><script async="" src="https://fundingchoicesmessages.google.com/i/ca-pub-1076724771190722?ers=2"></script></head>
  <body class="nodata " style=""><div id="MathJax_Message" style="display: none;"></div><div id="csdn-toolbar" style="position: relative; top: 0px; left: 0px; width: 100%;">
                    <div class="toolbar-inside">
                      <div class="toolbar-container">
                        <div class="toolbar-container-left">
                          <div class="toolbar-logo toolbar-subMenu-box csdn-toolbar-fl"><a data-report-click="{&quot;spm&quot;:&quot;3001.4476&quot;}" data-report-query="spm=3001.4476" href="https://www.csdn.net/"><img title="CSDN首页" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20201124032511.png"></a>
                    </div>
                          <ul class="toolbar-menus csdn-toolbar-fl"><li class="active " title="阅读深度、前沿文章">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/nav/cloud-native&quot;,&quot;spm&quot;:&quot;3001.4477&quot;}" data-report-query="spm=3001.4477" href="https://blog.csdn.net/nav/cloud-native">
                                  博客
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="高价值源码课程分享">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.6907&quot;}" data-report-query="spm=3001.6907" href="https://download.csdn.net/">
                                  下载·课程
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="马上开始系统学习">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4482&quot;}" data-report-query="spm=3001.4482" href="https://edu.csdn.net/">
                                  学习
                                  <img style="vertical-align: middle; width: 19px; height: 32px;margin-top: -2px;" "="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20220516045836.png">
                                  
                                </a>
                                
                                
                              </li><li class="" title="技术问题，有问必答">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://ask.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4492&quot;}" data-report-query="spm=3001.4492" href="https://ask.csdn.net/">
                                  问答
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="找到志同道合的伙伴">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://bbs.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.6068&quot;}" data-report-query="spm=3001.6068" href="https://bbs.csdn.net/">
                                  社区
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="安装你的浏览器助手">
                                <a data-report-click="{&quot;spm&quot;:&quot;3001.6135&quot;,&quot;dist&quot;:&quot; https://plugin.csdn.net/?utm_source=toolbar&quot;}" data-report-query="spm=3001.6135" href="https://plugin.csdn.net/?utm_source=toolbar">
                                  插件
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="认证你的技术能力">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://ac.csdn.net/?short_code=13271b93&quot;,&quot;spm&quot;:&quot;3001.5716&quot;}" data-report-query="spm=3001.5716" href="https://ac.csdn.net/?short_code=13271b93">
                                  认证
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="开源">
                                <a data-report-click="{&quot;mod&quot;:&quot;&quot;,&quot;dest&quot;:&quot;https://git.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.6768&quot;}" data-report-query="spm=3001.6768" href="https://git.csdn.net/">
                                  开源
                                  
                                  
                                </a>
                                
                                
                              </li></ul>
                        </div>
                        <div class="toolbar-container-middle">
                        <div class="toolbar-search onlySearch"><div class="toolbar-search-container">
                    <span class="icon-fire"></span>
                    <input id="toolbar-search-input" autocomplete="off" type="text" value="" placeholder="jvm无法分配内存" style="text-indent: 32px;">
                    <button id="toolbar-search-button"><i></i><span>搜索</span></button>
                    <input type="password" autocomplete="new-password" readonly="" disabled="true" style="display: none; position:absolute;left:-9999999px;width:0;height:0;">
                  </div></div></div>
                        <div class="toolbar-container-right">
                          <div class="toolbar-btns onlyUser"><div class="toolbar-btn toolbar-btn-login csdn-toolbar-fl ">
                       <a data-report-click="{&quot;spm&quot;:&quot;3001.5105&quot;}" data-report-query="spm=3001.5105" href="https://passport.csdn.net/account/login">登录/注册</a>
                      </div>
                    <div class="toolbar-btn toolbar-btn-vip csdn-toolbar-fl">
                      <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://mall.csdn.net/vip&quot;,&quot;spm&quot;:&quot;3001.4496&quot;}" data-report-query="spm=3001.4496" href="https://mall.csdn.net/vip">会员中心 <img style="position: relative; vertical-align: middle; width: 14px; top: -2px; left: 0px;;display:inline-block" "="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20210918025138.gif"></a>
                      </div>
                    <div class="toolbar-btn toolbar-btn-collect csdn-toolbar-fl">
                      <a data-report-click="{&quot;spm&quot;:&quot;3001.7480&quot;}" data-report-query="spm=3001.7480" href="https://i.csdn.net/#/user-center/collection-list?type=1">足迹</a>
                    </div>
                    <div class="toolbar-btn toolbar-btn-dynamic csdn-toolbar-fl"><a data-report-click="{&quot;spm&quot;:&quot;3001.4507&quot;}" data-report-query="spm=3001.4507" href="https://blink.csdn.net/">动态</a></div>
                    
                    <div class="toolbar-btn toolbar-btn-write csdn-toolbar-fl ">
                    <a data-report-click="{&quot;spm&quot;:&quot;3001.7765&quot;}" data-report-query="spm=3001.7765" href="https://mp.csdn.net/" class="btn-write-new"></a></div></div>
                        </div>
                      </div>
                    </div>
                  </div>
        <script>
            var toolbarSearchExt = '{"landingWord":["jvm无法分配内存"],"queryWord":"","tag":[],"title":"JVM -Xmx内存设置超过物理内存问题思考"}';
        </script>
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/csdn-toolbar.js.下载" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
<link rel="stylesheet" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/blog_code-01256533b5.min.css">
<link rel="stylesheet" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/chart-3456820cac.css">

<script>
    var articleId = 117816542;
    var commentscount = 1;
    var curentUrl = "https://blog.csdn.net/mutian6655/article/details/117816542";
    var myUrl = "https://my.csdn.net/";
    var highlight = ["分配内存","jvm","xmx","设置","物理","超过","问题","无法","内存","思考","-"];//高亮数组
    var isRecommendModule = true;
    var isBaiduPre = true;
    var baiduCount = 2;
    var share_card_url = "https://app-blog.csdn.net/share?article_id=117816542&username=mutian6655"
	var articleType = 1;
    var baiduKey = "jvm无法分配内存";
    var userNewReport = true;
    var needInsertBaidu = true;
    var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
    var codeStyle = "atom-one-light";
    var baiduSearchType = "baidulandingword";
    var canRead = true;
    var blogMoveHomeArticle = false;
    var showPcWindowAd = false;
    var showHeadWord = true;
    var showSearchText = "";
    var linkPage = true;
    var articleSource = 1;
    var articleReport = '{"pid": "blog", "spm":"1001.2101"}';
    var isShowToQuestion = false;
    var baiduSearchChannel = 'pc_relevant'
    var baiduSearchIdentification = '.pc_relevant_aa'
    var distRequestId = '1652768010672_76741'
    var initRewardObject = {
        giver: currentUserName,
        anchor: username,
        articleId: articleId,
        sign: ''
    }
    var isLikeStatus = false;
    var isUnLikeStatus = false;
    var studyLearnWord = "";
    var isCurrentUserVip = false;
    var commentIsNewBeat = "control"
</script>
<div class="main_father clearfix d-flex justify-content-center" style="height:100%;"> 
    <div class="container clearfix" id="mainBox">
        <script>
        if(!isCookieConcision){
            $('.main_father').removeClass('mainfather-concision')
            $('.main_father .container').removeClass('container-concision')
        }
        </script>
        <main>
<script type="text/javascript">
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs; 
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
        <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">JVM -Xmx内存设置超过物理内存问题思考</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                    <img class="article-type-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/original.png" alt="">
                    <div class="bar-content">
                    <a class="follow-nickName " href="https://blog.csdn.net/mutian6655" target="_blank" rel="noopener">明谨</a>
                    <img class="article-time-img article-heard-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newCurrentTime2.png" alt="">
                    <span class="time">于&nbsp;2021-06-11 14:35:42&nbsp;发布</span>
                    <img class="article-read-img article-heard-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/articleReadEyes2.png" alt="">
                    <span class="read-count">2514</span>
                    <a id="blog_detail_zk_collection" class="un-collection" data-report-click="{&quot;mod&quot;:&quot;popu_823&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4232&quot;,&quot;ab&quot;:&quot;new&quot;}">
                        <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/tobarCollect2.png" alt="">
                        <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/tobarCollectionActive2.png" alt="">
                        <span class="name">收藏</span>
                        <span class="get-collection">
                            2
                        </span>
                    </a>
                    </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                            <span class="label">分类专栏：</span>
                                <a class="tag-link" href="https://blog.csdn.net/mutian6655/category_9577298.html" target="_blank" rel="noopener">Java</a>
                    </div>
                </div>
                <div class="slide-content-box">
                    <div class="article-copyright">
                        <div class="creativecommons">
                            版权声明：本文为博主原创文章，遵循<a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener"> CC 4.0 BY-SA </a>版权协议，转载请附上原文出处链接和本声明。
                        </div>
                        <div class="article-source-link">
                            本文链接：<a href="https://blog.csdn.net/mutian6655/article/details/117816542" target="_blank">https://blog.csdn.net/mutian6655/article/details/117816542</a>
                        </div>
                    </div>
                </div>
                <div class="operating">
                    <a class="href-article-edit slide-toggle">版权</a>
                </div>
            </div>
        </div>
    </div>
        <div id="blogColumnPayAdvert">
            <div class="column-group">
                <div class="column-group-item column-group0 column-group-item-one">
                    <div class="item-l">
                        <a class="item-target" href="https://blog.csdn.net/mutian6655/category_9577298.html" target="_blank" title="Java" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6332&quot;}">
                            <img class="item-target" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222155031212.png" alt="">
                            <span class="title item-target">
                                <span>
                                <span class="tit">Java</span>
                                    <span class="dec">专栏收录该内容</span>
                                </span>
                            </span>
                        </a>
                    </div>
                    <div class="item-m">
                        <span>3 篇文章</span>
                        <span>0 订阅</span>
                    </div>
                    <div class="item-r">
                            <a class="item-target article-column-bt articleColumnFreeBt" data-id="9577298">订阅专栏</a>
                    </div>
                </div>
            </div>
        </div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/ck_htmledit_views-163de54645.css">
                <div id="content_views" class="markdown_views prism-atom-one-light">
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <p></p>
<div class="toc">
 <h3><a name="t0"></a>文章目录</h3>
 <ul><li><ul><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#_1" target="_self">问题提出</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#_4" target="_self">理论思考</a></li><li><ul><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#1_Xmx_5" target="_self">1. 是否可以设置`-Xmx`超过物理内存？</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#2_Xmx_9" target="_self">2. 是否可以将`-Xmx`设置的无限大？</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#3__14" target="_self">3. 当物理机内存耗尽时，会发生什么现象？</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#4_JVM_19" target="_self">4. JVM在堆内存不足和物理内存耗尽时会发生什么？</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#5_JVMGC_29" target="_self">5. JVM会因为临近物理内存大小而发生GC吗</a></li></ul>
   </li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#_34" target="_self">问题验证</a></li><li><ul><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#_35" target="_self">测试代码</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#Xmx_55" target="_self">测试Xmx最大值</a></li><li><ul><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#Windows_56" target="_self">Windows</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#Linux_81" target="_self">Linux</a></li></ul>
    </li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#_97" target="_self">测试内存溢出</a></li><li><ul><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#SWAP_98" target="_self">开启SWAP情况下</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#SWAP_130" target="_self">关闭SWAP情况下</a></li></ul>
    </li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#GC_150" target="_self">测试GC现象</a></li><li><ul><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#Swap_152" target="_self">关闭Swap</a></li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#Swap_171" target="_self">打开Swap</a></li></ul>
   </li></ul>
   </li><li><a href="https://blog.csdn.net/mutian6655/article/details/117816542#_182" target="_self">其他说明</a></li></ul>
 </li></ul>
</div>
<p></p> 
<h2><a name="t1"></a><a id="_1"></a>问题提出</h2> 
<p><a href="https://so.csdn.net/so/search?q=JVM&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=JVM&amp;spm=1001.2101.3001.7020&quot;}" data-tit="JVM" data-pretit="jvm">JVM</a>是否可以设置<code>-Xmx</code>超过物理<a href="https://so.csdn.net/so/search?q=%E5%86%85%E5%AD%98&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E5%86%85%E5%AD%98&amp;spm=1001.2101.3001.7020&quot;}" data-tit="内存" data-pretit="内存">内存</a>？如果设置，当内存使用接近物理内存后会发生什么现象？会发生GC吗？</p> 
<h2><a name="t2"></a><a id="_4"></a>理论思考</h2> 
<h3><a name="t3"></a><a id="1_Xmx_5"></a>1. 是否可以设置<code>-Xmx</code>超过物理内存？</h3> 
<ul><li>可以。</li><li>JVM并不在启动时申请如此大的内存。适当的超出物理内存是允许的。</li></ul> 
<h3><a name="t4"></a><a id="2_Xmx_9"></a>2. 是否可以将<code>-Xmx</code>设置的无限大？</h3> 
<ul><li>不可以。</li><li>JVM的一些垃圾回收算法，会使用到卡表(card tables)、 bitmap等，如果JVM检验到Heap区内存大到无法创建这些引用，或着直接超出操作系统可以预定的最大内存，会报错。</li><li>这个具体的值跟操作系统、JVM版本、物理机内存等都有关系</li></ul> 
<h3><a name="t5"></a><a id="3__14"></a>3. 当物理机内存耗尽时，会发生什么现象？</h3> 
<ul><li>以Linux为例，如果 <strong>开启了Swap</strong> 
  <ul><li>内存耗尽时会使用Swap，系统会出现抖动 (thrashing) 现象，系统性能会急剧下降</li></ul> </li><li>如果<strong>未开启Swap</strong>，内存耗尽，或着 <strong>Swap 区也耗尽</strong> 时会发生什么？ 
  <ul><li>会发生无法分配内存</li></ul> </li></ul> 
<h3><a name="t6"></a><a id="4_JVM_19"></a>4. JVM在<a href="https://so.csdn.net/so/search?q=%E5%A0%86%E5%86%85%E5%AD%98&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E5%A0%86%E5%86%85%E5%AD%98&amp;spm=1001.2101.3001.7020&quot;}" data-tit="堆内存" data-pretit="堆内存">堆内存</a>不足和物理内存耗尽时会发生什么？</h3> 
<ol><li>持续分配对象，首先在<code>Eden</code>区上无法分配对象时，会先触发 <code>YoungGC</code> 
  <ol><li>在触发<code>YoungGC</code>前，如果老年代剩余空间小于年轻代现有所有对象，且小于历次进入老年代的平均大小时，会先触发<code>老年代空间分配担保</code>，进行<code>FullGC</code></li></ol> </li><li>如果对象长期存活，或着GC后触发动态年龄判断，对象会进入老年代，如果老年代装满时，触发 <code>FullGC</code></li><li>触发 <code>FullGC</code> 后会有以下几种情况 
  <ol><li>如果是刚启动时，由于JVM启动时会先使用一个较小的内存（默认1/64内存大小），当GC后内存不足且没有到达 <code>-Xmx</code> 最大值时，会发生 <strong>堆扩容</strong>。 
    <ol><li>如果扩容时无法申请内存，将发生 <strong>JVM物理内存无法申请</strong> 错误</li></ol> </li><li>如果因启用 Swap 区后，系统性能下降，GC的时间持续太长后，可能会触发 <strong>OOM 超出GC开销限制</strong> 错误 
    <ol><li>JVM如果花了98%的时间进行垃圾回收，而只得到2%可用的内存，频繁的进行内存回收(最起码已经进行了5次连续的垃圾回收)时，会报这个错误</li></ol> </li><li>如果在 FullGC 之后，未回收太多的空间，仍然无法放下对象时，会触发 <strong>OOM 堆内存溢出</strong> 错误</li></ol> </li></ol> 
<h3><a name="t7"></a><a id="5_JVMGC_29"></a>5. JVM会因为临近物理内存大小而发生GC吗</h3> 
<ol><li>不会。</li><li>JVM是否发生<code>YoungGC</code>和<code>FullGC</code>始终与JVM堆内存的使用情况有关，与物理内存没有直接的关系</li><li>如果不考虑<code>Swap</code>，通常未到达物理内存大小时，JVM就因为无法扩容而崩溃了</li></ol> 
<h2><a name="t8"></a><a id="_34"></a>问题验证</h2> 
<h3><a name="t9"></a><a id="_35"></a>测试代码</h3> 
<p>不断往static list中添加一个10M的对象，让内存溢出</p> 
<pre class="prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>util<span class="token punctuation">.</span></span><span class="token class-name">LinkedList</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>util<span class="token punctuation">.</span></span><span class="token class-name">List</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>concurrent<span class="token punctuation">.</span></span><span class="token class-name">TimeUnit</span><span class="token punctuation">;</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TestGC</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">private</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">TestGC</span><span class="token punctuation">&gt;</span></span> list <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">LinkedList</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token punctuation">&gt;</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">public</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> bytes <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">10</span><span class="token operator">*</span><span class="token number">1024</span><span class="token operator">*</span><span class="token number">1024</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> <span class="token class-name">InterruptedException</span> <span class="token punctuation">{<!-- --></span>
        <span class="token comment">// TimeUnit.SECONDS.sleep(15);</span>
        <span class="token keyword">long</span> count <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
        <span class="token keyword">for</span><span class="token punctuation">(</span><span class="token punctuation">;</span><span class="token punctuation">;</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
            <span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>count<span class="token operator">++</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            list<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">TestGC</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token comment">// TimeUnit.MILLISECONDS.sleep(1000);</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li></ul></pre> 
<h3><a name="t10"></a><a id="Xmx_55"></a>测试Xmx最大值</h3> 
<h4><a id="Windows_56"></a>Windows</h4> 
<ul><li> <p><strong>测试环境</strong></p> 
  <ul><li>操作系统 <code>Window 10</code></li><li>JDK <code>1.8.0_241</code></li><li>物理内存 <code>16GB</code></li></ul> </li><li> <p><code>java -Xmx100g TestGC</code></p> 
  <ul><li>正常启动</li></ul> </li><li> <p><code>java -Xmx1400g TestGC</code></p> </li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">Error occurred during initialization of VM
Unable to allocate 2867200KB card tables for parallel garbage collection for the requested 1468006400KB heap.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<ul><li><code>java -Xmx1600g TestGC</code></li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">Error occurred during initialization of VM
Unable to allocate 52428800KB bitmaps for parallel garbage collection for the requested 1677721600KB heap.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<blockquote> 
 <p>不在Windows下测试OOM情况，只测试是否可以启动</p> 
</blockquote> 
<h4><a id="Linux_81"></a>Linux</h4> 
<ul><li> <p><strong>测试环境</strong></p> 
  <ul><li>操作系统：<code>CentOS 7.9</code></li><li>JDK： <code>openjdk 1.8.9_292</code></li><li>物理内存：<code>2GB</code></li><li>SWAP： <code>2GB</code></li></ul> </li><li> <p><code>java -Xmx40t TestGC</code></p> 
  <ul><li>正常启动</li></ul> </li><li> <p><code>java -Xmx87t TestGC</code></p> 
  <ul><li>报错</li></ul> </li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">Error occurred during initialization of VM
Could not reserve enough space for 93415538688KB object heap

<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<h3><a name="t11"></a><a id="_97"></a>测试内存溢出</h3> 
<h4><a id="SWAP_98"></a>开启<a href="https://so.csdn.net/so/search?q=SWAP&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=SWAP&amp;spm=1001.2101.3001.7020&quot;}" data-tit="SWAP" data-pretit="swap">SWAP</a>情况下</h4> 
<ul><li><strong>-Xmx 大于物理内存，但小于(物理内存+Swap)</strong> 
  <ul><li><code>java -Xmx3g TestGC</code></li><li>在打印到 142 (内存接近1.5GB)时，速度开始明显下降</li><li>最后打印到 295 (内存接近3GB)时，报错 <strong>OOM 堆内存溢出</strong></li></ul> </li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">...
293
294
295
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at TestGC.&lt;init&gt;(TestGC.java:7)
    at TestGC.main(TestGC.java:14)
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li></ul></pre> 
<ul><li><strong>-Xmx 大于物理内存，且大于(物理内存+SWAP)</strong> 
  <ul><li><code>java -Xmx8g TestGC</code></li><li>在打印到 142 时，速度开始明显下降</li><li>最后打印到 199 时，报错 <strong>JVM 无法分配内存</strong></li></ul> </li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">...
196
197
198
199
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006e2e95000, 1338490880, 0) failed; error='无法分配内存' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1338490880 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /root/test-java/hs_err_pid3770.log
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li></ul></pre> 
<h4><a id="SWAP_130"></a>关闭SWAP情况下</h4> 
<ul><li>无论 <code>java -Xmx3g TestGC</code> 还是 <code>java -Xmx8g TestGC</code> 结果均如下 
  <ul><li>最后打印到 89 时，报错 JVM 无法分配内存</li></ul> </li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">...
83
84
85
86
87
88
89
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006f5c83000, 601100288, 0) failed; error='无法分配内存' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 601100288 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /root/test-java/hs_err_pid3917.log
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li></ul></pre> 
<h3><a name="t12"></a><a id="GC_150"></a>测试GC现象</h3> 
<ul><li>将代码中的注释放开</li></ul> 
<h4><a id="Swap_152"></a>关闭Swap</h4> 
<ul><li>使用 <code>jstat -gc PID 1000 10000</code> 跟踪如下</li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;"> S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT   
1024.0 1024.0  0.0    0.0    8192.0   507.9    20480.0      0.0     4480.0 875.7  384.0   76.6       0    0.000   0      0.000    0.000
1024.0 1024.0  0.0    0.0    8192.0   507.9    20480.0    10240.0   4480.0 875.7  384.0   76.6       0    0.000   0      0.000    0.000
1024.0 1024.0  0.0    0.0    8256.0    0.0     30724.0    20743.0   4864.0 3003.3 512.0  287.0       1    0.001   1      0.001    0.002
1728.0 1728.0  0.0    0.0   13888.0  10240.0   34572.0    20743.0   4864.0 3003.6 512.0  287.0       2    0.001   2      0.003    0.004
1728.0 1728.0  0.0    0.0   13888.0  10240.0   34572.0    30983.0   4864.0 3004.0 512.0  287.0       3    0.003   2      0.003    0.006
3392.0 3392.0  0.0    0.0   27584.0  10240.0   68708.0    41223.1   4864.0 3004.0 512.0  287.0       4    0.005   3      0.004    0.009
3392.0 3392.0  0.0    0.0   27584.0  21022.0   68708.0    41223.1   4864.0 3004.0 512.0  287.0       4    0.005   3      0.004    0.009
...
33280.0 33280.0  0.0   30721.4 266496.0 230392.1  666044.0   624904.5  4864.0 3007.0 512.0  287.0      11    0.233   6      0.025    0.258
33280.0 33280.0  0.0   30721.4 266496.0 240632.1  666044.0   624904.5  4864.0 3007.0 512.0  287.0      11    0.233   6      0.025    0.258
33280.0 33280.0  0.0   30721.4 266496.0 250872.2  666044.0   624904.5  4864.0 3007.0 512.0  287.0      11    0.233   6      0.025    0.258
33280.0 33280.0  0.0   30721.4 266496.0 261112.2  666044.0   624904.5  4864.0 3007.0 512.0  287.0      11    0.233   6      0.025    0.258
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li></ul></pre> 
<blockquote> 
 <p>并没有看到 在接近物理内存时的 GC，发生时机与预期一致</p> 
</blockquote> 
<h4><a id="Swap_171"></a>打开Swap</h4> 
<ul><li>现象与关闭时的类似</li><li>在临近报错时，可以看到最后两次明显的GC时间变长，说明GC效率下降，系统变慢</li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;"> S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT  
73408.0 73408.0 71680.7 71683.3 587328.0 584592.5 1478424.0  1474827.5  4864.0 3027.2 512.0  287.0      14    1.836   7      0.029    1.865
73408.0 73408.0 71681.4 71683.3 587328.0 584592.5 1652572.0  1638667.7  4864.0 3027.2 512.0  287.0      14    1.836   7      0.029    1.865
73408.0 73408.0 71682.0 71683.3 587328.0 584592.5 1836964.0  1833228.0  4864.0 3027.2 512.0  287.0      14    1.836   7      0.029    1.865
73408.0 73408.0 71682.3  0.0   587328.0   0.0    1970136.0  1966351.2  4864.0 3027.2 512.0  287.0      14   22.270   8      0.029   22.299
73408.0 73408.0  0.0     0.0   587328.0 71682.3  1970136.0  1966351.3  4864.0 3027.2 512.0  287.0      14   22.270   8      0.589   22.859
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li></ul></pre> 
<h2><a name="t13"></a><a id="_182"></a>其他说明</h2> 
<ul><li>以下现象未复现 
  <ul><li>由于该现象的条件比较苛刻，不容易复现</li><li>复现要求：JVM如果花了98%的时间进行垃圾回收，而只得到2%可用的内存，频繁的进行内存回收(最起码已经进行了5次连续的垃圾回收) 超出GC开销限制</li></ul> </li></ul> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">java.lang.OutOfMemoryError: GC overhead limit exceeded
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre>
                </div><div><div></div></div>
                <link href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/markdown_views-3fd7f7a902.css" rel="stylesheet">
                <link href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/style-49037e4d27.css" rel="stylesheet">
        </div>
        
    </article>
  <script>
  $(function() {
    setTimeout(function () {
      var mathcodeList = document.querySelectorAll('.htmledit_views img.mathcode');
      if (mathcodeList.length > 0) {
        var testImg = new Image();
        testImg.onerror = function () {
          mathcodeList.forEach(function (item) {
            $(item).before('<span class="img-codecogs">\\(' + item.alt + '\\)</span>');
            $(item).remove();
          })
          MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
        }
        testImg.src = mathcodeList[0].src;
      }
    }, 1000)
  })
  </script>
</div>
<div class="more-toolbox-new more-toolbox-active" id="toolBarBox">
    <div class="left-toolbox" style="position: fixed; z-index: 999; left: 450.5px; bottom: 0px; width: 1010px;">
        <div class="toolbox-left">
            <div class="profile-box"><a class="profile-href" target="_blank" href="https://blog.csdn.net/mutian6655"><img class="profile-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/3_mutian6655"><span class="profile-name">明谨</span></a></div>
            <div class="profile-attend">
                    <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;">关注</a>
                <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </div>
        </div>
        <div class="toolbox-middle">
        <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like">
            <a class="tool-item-href">
                <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/tobarThumbUpactive.png" alt="">
                <img class="isactive" style="display:none" id="is-like-imgactive" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newHeart2021Active.png" alt="">
                <img class="isdefault" style="display:block" id="is-like-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newHeart2021White.png" alt="">  
                <span id="spanCount" class="count ">
                        1
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">点赞</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-unlike" id="is-unlike">
            <a class="tool-item-href">
                <img class="isactive" style="margin-right:0px;display:none" id="is-unlike-imgactive" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newUnHeart2021Active.png" alt="">
                <img class="isdefault" style="margin-right:0px;display:block" id="is-unlike-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newUnHeart2021White.png" alt="">
                <span id="unlikeCount" class="count "></span>
            </a>
            <div class="tool-hover-tip"><span class="text space">踩</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-comment">
            <a class="tool-item-href" href="https://blog.csdn.net/mutian6655/article/details/117816542#commentBox" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7009&quot;}">
                <img class="isdefault" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newComment2021White.png" alt="">
                <span class="count">
                    1
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">评论</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
            <a class="tool-item-href" href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_824&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4130&quot;,&quot;ab&quot;:&quot;new&quot;}">
                <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/tobarCollectionActive.png" alt="">
                <img class="isdefault" id="is-collection-img" style="display:block" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newCollectWhite.png" alt="">
                <img class="isactive" id="is-collection-imgactive" style="display:none" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newCollectActive.png" alt="">
                <span class="count get-collection " id="get-collection">
                    2
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">收藏</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-reward">
                <a class="tool-item-href" href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_830&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4237&quot;,&quot;dest&quot;:&quot;&quot;,&quot;ab&quot;:&quot;new&quot;}">
                <img class="isdefault reward-bt" id="rewardBtNew" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newRewardWhite.png" alt="打赏">
                <span class="count"></span>
                </a>
                <div class="tool-hover-tip"><span class="text space">打赏</span></div>
            </li>
            <li class="tool-item tool-item-bar">
            </li>
            <li class="tool-item tool-item-size tool-active tool-QRcode" id="tool-share">
                <a class="tool-item-href" href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;1582594662_002&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4129&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img class="isdefault" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newShareWhite.png" alt="">
                </a>
                <div class="QRcode" id="tool-QRcode">
                    <p class="title">
                    扫一扫，分享内容
                    </p>
                    <div id="shareCode"></div>
                    <a id="copyPosterUrl" class="url" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7493&quot;}" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7493&quot;}">点击复制链接</a>
                </div>
            </li>
        </ul>
        </div>
        <div class="toolbox-right">
                <div class="tool-directory">
                    <a class="bt-columnlist-show" data-id="9577298" data-free="true" data-subscribe="false" data-title="Java" data-img="https://img-blog.csdnimg.cn/20200222155031212.png?x-oss-process=image/resize,m_fixed,h_224,w_224" data-url="https://blog.csdn.net/mutian6655/category_9577298.html" data-sum="3" data-people="0" data-price="0" data-oldprice="0" data-join="false" data-studyvip="false" data-studysubscribe="false" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6334&quot;,&quot;extend1&quot;:&quot;专栏目录&quot;}">专栏目录</a>
                </div>
        </div>
    </div>  
</div>
<script type="text/javascript" crossorigin="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/qrcode-7c90a92189.min.js.下载"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/saved_resource(3)" type="text/javascript"></script>
<script type="text/javascript" crossorigin="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-login.js.下载"></script>
<script type="text/javascript" crossorigin="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/collection-box.js.下载"></script>
                <div class="first-recommend-box recommend-box">
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_45987729/article/details/124800012">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_45987729/article/details/124800012" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.697559\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;hitKeyWords\&quot;:3}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;index&quot;:&quot;1&quot;,&quot;style&quot;:&quot;text_3&quot;,&quot;strategy&quot;:&quot;32_697559_RCMD&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_45987729/article/details/124800012&quot;}" data-report-query="spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.697559&amp;depth_1-utm_source=distribute.pc_relevant_t0.697559&amp;utm_relevant_index=1">
					<div class="left ellipsis-online ellipsis-online-1">他98年的，我玩不过他...</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_45987729" target="_blank" data-report-query="spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.697559&amp;depth_1-utm_source=distribute.pc_relevant_t0.697559&amp;utm_relevant_index=1"><span class="blog-title">21世紀難民的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-16</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					56
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_45987729/article/details/124800012" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.697559\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;hitKeyWords\&quot;:3}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;index&quot;:&quot;1&quot;,&quot;style&quot;:&quot;text_3&quot;,&quot;strategy&quot;:&quot;32_697559_RCMD&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_45987729/article/details/124800012&quot;}" data-report-query="spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.697559&amp;depth_1-utm_source=distribute.pc_relevant_t0.697559&amp;utm_relevant_index=1">
				<div class="desc ellipsis-online ellipsis-online-1">现在的小年轻真的卷得过分了。前段时间我们公司来了个98年的，工作没两年，跳槽到我们公司起薪18K，都快接近我了。后来才知道人家是个卷王，从早干到晚就差搬张床到工位睡觉了。

最近和他聊了一次天，原来这位小老弟家里条件不太好，一大家子指望他一个人养活，所以他再大三的时候就已经开始自学Java了，大四获得了一个小公司的实习机会。在工作中不断的学习、实践，花的时间比别人多一倍，所以才能打下扎实的基础，现在工作也是得心应手。



了解到这些情况之后我反而开始由衷的敬佩这个比我小好几岁的大男孩儿了。

我认为这位小</div>
			</a>
		</div>
	</div>
</div>
                </div>
            <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/pc_wap_commontools-6cd02ebed1.min.js.下载" type="text/javascript" async=""></script>
            <div class="second-recommend-box recommend-box">
<div class="recommend-item-box type_blog clearfix" data-url="https://itxingqing.blog.csdn.net/article/details/90476025">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://itxingqing.blog.csdn.net/article/details/90476025" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1-90476025-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://itxingqing.blog.csdn.net/article/details/90476025&quot;}" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-90476025-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-90476025-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=2">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em><em>内存</em><em>设置</em>多大合适？<em>Xmx</em>和Xmn如何<em>设置</em>？<em>JVM</em><em>内存</em>分配比例</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/itxiaohei323" target="_blank" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-90476025-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-90476025-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=2"><span class="blog-title">IT小黑</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-23</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					7390
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://itxingqing.blog.csdn.net/article/details/90476025" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1-90476025-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://itxingqing.blog.csdn.net/article/details/90476025&quot;}" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-90476025-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-90476025-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=2">
				<div class="desc ellipsis-online ellipsis-online-1">直接参考以下链接

https://www.dutycode.com/<em>jvm</em>_<em>xmx</em>_xmn_xms_shezhi.html
</div>
			</a>
		</div>
	</div>
</div>
            </div>
<a id="commentBox" name="commentBox"></a>
<div id="pcCommentBox" class="comment-box comment-box-new unlogin-comment-box-new">
	<div class="unlogin-comment-model">
			<span class="unlogin-comment-tit">评论&nbsp;1</span>
			<span class="unlogin-comment-text">您还未登录，请先</span>
			<span class="unlogin-comment-bt">登录</span>
			<span class="unlogin-comment-text">后发表或查看评论</span>
	</div>
</div>
            <div class="recommend-box insert-baidu-box recommend-box-style">
                <div class="recommend-item-box clearfix no-index" style="display:none"></div><div class="recommend-item-box baiduSearch clearfix" data-type="blog">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/weixin_35890416/article/details/114554392" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-114554392-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.1&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_35890416/article/details/114554392&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;0&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-114554392-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.1&amp;utm_relevant_index=3">					                <div class="left ellipsis-online ellipsis-online-1">java<em>内存</em>分配不足_了解<em>JVM</em><em>内存</em>分配和Java<em>内存</em>不足:堆空...</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">3-28</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/weixin_35890416/article/details/114554392" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-114554392-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.1&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_35890416/article/details/114554392&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;0&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-114554392-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.1&amp;utm_relevant_index=3">                      <div class="desc ellipsis-online ellipsis-online-1">How does the<em>JVM</em>actually allocate memory for itself? 对于堆,它分配一个大的最大大小的<em>内存</em>区域.最初,这是虚拟<em>内存</em>,但随着时间的推移,它在OS的控制下成为所使用部分的真实<em>内存</em> How does this relate to how the OS communicates av...</div>                    </a>                  </div>                </div>              </div><div class="recommend-item-box baiduSearch clearfix" data-type="blog">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/sllin/article/details/107033394" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-107033394-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.2&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/sllin/article/details/107033394&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;1&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-107033394-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.2&amp;utm_relevant_index=4">					                <div class="left ellipsis-online ellipsis-online-1">【转】<em>JVM</em> 运行时的<em>内存</em>分配_sllin的博客</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">4-2</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/sllin/article/details/107033394" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-107033394-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.2&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/sllin/article/details/107033394&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;1&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-107033394-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.2&amp;utm_relevant_index=4">                      <div class="desc ellipsis-online ellipsis-online-1">每一个<em>JVM</em>线程都有自己的java虚拟机栈,这个栈与线程同时创建,它的生命周期与线程相同。虚拟机栈描述的是Java方法执行的<em>内存</em>模型:每个方法被执行的时候都会同时创建一个栈帧(Stack Frame)用于存储局部变量表、操作数栈、动态链接、方法...</div>                    </a>                  </div>                </div>              </div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/myth_g/article/details/119855832">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/myth_g/article/details/119855832" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2-119855832-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/myth_g/article/details/119855832&quot;}" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-119855832-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-119855832-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=5">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em>实际<em>内存</em>占用<em>超过</em><em>Xmx</em>的原因,<em>设置</em><em>Xmx</em>的技巧</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/myth_g" target="_blank" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-119855832-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-119855832-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=5"><span class="blog-title">myth_g的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">08-22</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					2442
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/myth_g/article/details/119855832" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2-119855832-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/myth_g/article/details/119855832&quot;}" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-119855832-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-119855832-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=5">
				<div class="desc ellipsis-online ellipsis-online-1">前言
不知道大家在开发过程中有没有遇到过类似的<em>问题</em>，明明通过<em>JVM</em>参数<em>-</em><em>Xmx</em>4g<em>设置</em>了最大堆<em>内存</em>大小为4g，但是程序运行一段时间后发现占用的<em>内存</em>明显<em>超过</em>了8g，却并没有出现<em>内存</em>溢出等<em>问题</em>，那是什么东西占用了额外的<em>内存</em>空间呢？

一、背景
1.通过free <em>-</em>g查看服务器<em>内存</em>使用情况





2.通过ps查看java进程
项目启动命令为：


java <em>-</em><em>Xmx</em>6g <em>-</em>Xms6g <em>-</em> <em>-</em>XX:+UseG1GC <em>-</em>jar /home/pgcp/pgcp<em>-</em>0.0.1<em>-</em>SNAPSHOT.jar





3..</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_41947378/article/details/113918923">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_41947378/article/details/113918923" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3-113918923-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_41947378/article/details/113918923&quot;}" data-report-query="spm=1001.2101.3001.6650.3&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-113918923-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-113918923-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=6">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em>原理（一）<em>JVM</em>通识、<em>JVM</em>架构</div>
					<div class="tag">热门推荐</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_41947378" target="_blank" data-report-query="spm=1001.2101.3001.6650.3&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-113918923-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-113918923-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=6"><span class="blog-title">多学习多思考</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">02-21</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_41947378/article/details/113918923" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3-113918923-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_41947378/article/details/113918923&quot;}" data-report-query="spm=1001.2101.3001.6650.3&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-113918923-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3-113918923-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=6">
				<div class="desc ellipsis-online ellipsis-online-1">一、初识<em>JVM</em>
1.1 学习<em>JVM</em>的目的

面试重灾区，我们必须搞懂它。
生产过程中，肯定会面临<em>JVM</em>调优相关<em>问题</em>，需要也必须搞懂它。
打基础，想搞懂我们java赖以生存的环境长什么样子，提升对Java知识点的理解。

1.2 <em>JVM</em>基本常识
1.2.1 为什么使用<em>JVM</em>
看下面这个图：

可以看到<em>JVM</em>帮我们屏蔽了操作系统。

与C语言的区别：
C语言可以直接编译成机器码，但是编译机器码时需要知道目标操作系统，windows操作系统机器码编译之后是<em>无法</em>在linux系统上执行

即C语言多次运行不同的操作系</div>
			</a>
		</div>
	</div>
</div><div class="recommend-item-box baiduSearch clearfix" data-type="blog">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/qq_45725126/article/details/119251153" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-4-119251153-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.3&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_45725126/article/details/119251153&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;4&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-4-119251153-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.3&amp;utm_relevant_index=7">					                <div class="left ellipsis-online ellipsis-online-1">JAVA虚拟机——<em>JVM</em>的<em>内存</em>区域与<em>内存</em>溢出异常_Autumnn11...</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">3-17</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/qq_45725126/article/details/119251153" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-4-119251153-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.3&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_45725126/article/details/119251153&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;4&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-4-119251153-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.3&amp;utm_relevant_index=7">                      <div class="desc ellipsis-online ellipsis-online-1"><em>JVM</em>在执行Java程序过程中,会把它所管理的<em>内存</em>划分为若干个不同的数据区域 1、程序计数器 程序计数器–Program Counter Register是很小的一块<em>内存</em>区域,可以看做是当前线程所执行字节码的行号指示器。 </div>                    </a>                  </div>                </div>              </div><div class="recommend-item-box baiduSearch clearfix" data-type="blog">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/haponchang/article/details/116520375" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-5-116520375-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.4&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/haponchang/article/details/116520375&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;5&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-5-116520375-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.4&amp;utm_relevant_index=8">					                <div class="left ellipsis-online ellipsis-online-1">优化<em>JVM</em><em>内存</em>分配_hp15的博客_<em>jvm</em><em>分配内存</em></div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">3-23</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/haponchang/article/details/116520375" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-5-116520375-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.4&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/haponchang/article/details/116520375&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_baidulandingword~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;5&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-5-116520375-blog-117816542.pc_relevant_aa&amp;spm=1001.2101.3001.4242.4&amp;utm_relevant_index=8">                      <div class="desc ellipsis-online ellipsis-online-1"><em>JVM</em> 调优是一个系统而又复杂的过程,但我们知道,在大多数情况下,我们基本不用去调整 <em>JVM</em> <em>内存</em>分配,因为一些初始化的参数已经可以保证应用服务正常稳定地工作了。但所有的调优都是有目标性的,<em>JVM</em> <em>内存</em>分配调优也一样。没有性能<em>问题</em>的时候...</div>                    </a>                  </div>                </div>              </div>
		
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/wzysz117/article/details/118303711">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/wzysz117/article/details/118303711" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4-118303711-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/wzysz117/article/details/118303711&quot;}" data-report-query="spm=1001.2101.3001.6650.4&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-118303711-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-118303711-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=9">
					<div class="left ellipsis-online ellipsis-online-1"><em>jvm</em><em>内存</em>默认分配</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/wzysz117" target="_blank" data-report-query="spm=1001.2101.3001.6650.4&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-118303711-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-118303711-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=9"><span class="blog-title">wzysz117的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-28</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					313
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/wzysz117/article/details/118303711" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4-118303711-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/wzysz117/article/details/118303711&quot;}" data-report-query="spm=1001.2101.3001.6650.4&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-118303711-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4-118303711-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=9">
				<div class="desc ellipsis-online ellipsis-online-1">堆<em>内存</em>



<em>JVM</em> 初始分配的<em>内存</em>由<em>-</em>Xms 指定，默认是<em>物理</em><em>内存</em>的 1/64；



<em>JVM</em> 最大分配的<em>内存</em>由<em>-</em><em>Xmx</em> 指定，默认是<em>物理</em><em>内存</em>的 1/4；



默认空余堆<em>内存</em>小于 40% 时，<em>JVM</em> 就会增大堆直到<em>-</em><em>Xmx</em> 的最大限制；空余堆<em>内存</em>大于 70% 时，<em>JVM</em> 会减少堆直到 <em>-</em>Xms 的最小限制；



因此服务器一般<em>设置</em><em>-</em>Xms、<em>-</em><em>Xmx</em> 相等以避免在每次 GC 后调整堆的大小。对象的堆<em>内存</em>由称为垃圾回收器的自动<em>内存</em>管理系统回收。







非堆<em>内存</em>分配



<em>JVM</em> 使用<em>-</em>XX:Per</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_39407066/article/details/107965448">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_39407066/article/details/107965448" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-5-107965448-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_39407066/article/details/107965448&quot;}" data-report-query="spm=1001.2101.3001.6650.5&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-107965448-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-107965448-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=10">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em>详解</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_39407066" target="_blank" data-report-query="spm=1001.2101.3001.6650.5&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-107965448-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-107965448-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=10"><span class="blog-title">程序员的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">12-10</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					218
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_39407066/article/details/107965448" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-5-107965448-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_39407066/article/details/107965448&quot;}" data-report-query="spm=1001.2101.3001.6650.5&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-107965448-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-5-107965448-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=10">
				<div class="desc ellipsis-online ellipsis-online-1"><em>JVM</em>：从软件层面屏蔽了底层硬件、指令层面的细节，保证了跨平台。

JRE：Java程序运行环境，JDK：Java程序的开发环境. JDK: JRE + 工具 。JRE: <em>JVM</em> + 类库（javaSE）。

每个Java应用程序有一个Runtime类的实例，使运行程序与运行环境相连接，Runtime的exec（string）方法可以执行dos命令。通过Runtime的getRuntime返回实例。



程序计数器：指向当前线程正在执行的字节码指令的地址（行号）。而线程只负责执行，不负责记忆。

栈帧：栈</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://laowan.blog.csdn.net/article/details/113340344">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://laowan.blog.csdn.net/article/details/113340344" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6-113340344-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://laowan.blog.csdn.net/article/details/113340344&quot;}" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-113340344-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-113340344-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=11">
					<div class="left ellipsis-online ellipsis-online-1">为什么<em>设置</em><em>-</em><em>Xmx</em>4g但是java进程<em>内存</em>占用达到8g？</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/w1014074794" target="_blank" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-113340344-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-113340344-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=11"><span class="blog-title">弹指天下</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-28</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					7794
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://laowan.blog.csdn.net/article/details/113340344" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6-113340344-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://laowan.blog.csdn.net/article/details/113340344&quot;}" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-113340344-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6-113340344-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=11">
				<div class="desc ellipsis-online ellipsis-online-1">前言
不知道大家在开发过程中有没有遇到过类似的<em>问题</em>，明明通过<em>JVM</em>参数<em>-</em><em>Xmx</em>4g<em>设置</em>了最大堆<em>内存</em>大小为4g，但是程序运行一段时间后发现占用的<em>内存</em>明显<em>超过</em>了8g，却并没有出现<em>内存</em>溢出等<em>问题</em>，那是什么东西占用了额外的<em>内存</em>空间呢？

一、背景
1.通过free <em>-</em>g查看服务器<em>内存</em>使用情况

2.通过ps查看java进程
项目启动命令为：
java <em>-</em><em>Xmx</em>6g <em>-</em>Xms6g <em>-</em> <em>-</em>XX:+UseG1GC <em>-</em>jar /home/pgcp/pgcp<em>-</em>0.0.1<em>-</em>SNAPSHOT.jar


3.通过top命令查看资</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/yucaifu1989/article/details/108107124">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/yucaifu1989/article/details/108107124" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7-108107124-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/yucaifu1989/article/details/108107124&quot;}" data-report-query="spm=1001.2101.3001.6650.7&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-108107124-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-108107124-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=12">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em><em>内存</em>限制和调整</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/yucaifu1989" target="_blank" data-report-query="spm=1001.2101.3001.6650.7&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-108107124-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-108107124-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=12"><span class="blog-title">梦想起飞的地方.........</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">08-19</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					1277
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/yucaifu1989/article/details/108107124" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7-108107124-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/yucaifu1989/article/details/108107124&quot;}" data-report-query="spm=1001.2101.3001.6650.7&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-108107124-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7-108107124-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=12">
				<div class="desc ellipsis-online ellipsis-online-1"><em>JVM</em><em>内存</em>限制和调整


今天用java <em>-</em>jar执行一个jar文件提示<em>内存</em>不够，需要<em>设置</em>虚拟机的堆大小。以下是参考资料：
堆(Heap)和非堆(Non<em>-</em>heap)<em>内存</em>
　　按照官方的说法：“Java 虚拟机具有一个堆，堆是运行时数据区域，所有类实例和数组的<em>内存</em>均从此处分配。堆是在 Java 虚拟机启动时创建的。”“在<em>JVM</em>中堆之外的<em>内存</em>称为非堆<em>内存</em>(Non<em>-</em>heap memory)”。可以看出<em>JVM</em>主要管理两种类型的<em>内存</em>：堆和非堆。简单来说堆就是Java代码可及的<em>内存</em>，是留给开发人员使用的；非堆就是J..</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/ZhouyuanLinli/article/details/78251342">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/ZhouyuanLinli/article/details/78251342" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.8&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8-78251342-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;8&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/ZhouyuanLinli/article/details/78251342&quot;}" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-78251342-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-78251342-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=13">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em><em>无法</em>分配<em>问题</em>（系统性能参数调优）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/ZhouyuanLinli" target="_blank" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-78251342-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-78251342-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=13"><span class="blog-title">周源的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-16</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					408
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/ZhouyuanLinli/article/details/78251342" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.8&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8-78251342-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;8&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/ZhouyuanLinli/article/details/78251342&quot;}" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-78251342-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8-78251342-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=13">
				<div class="desc ellipsis-online ellipsis-online-1">free <em>-</em>m
查看，存在剩余<em>内存</em>。需要对内核参数性能调优，系统实际能使用的<em>内存</em>上限为：overcommit_ratio * <em>物理</em><em>内存</em> + swap<em>内存</em>；
&nbsp;overcommit_ratio比例只有50%，调高overcommit_ratio比例或加大swap<em>内存</em>即可；



在命令行中执行：set vm.overcommit_ratio=80（默认50%，重启失效，可写入配置文件中）</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_52008536/article/details/122285143">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_52008536/article/details/122285143" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.9&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-9-122285143-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;9&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_52008536/article/details/122285143&quot;}" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-122285143-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-122285143-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=14">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em> 对象创建<em>内存</em>分配以及常见的OOM<em>问题</em></div>
					<div class="tag">最新发布</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_52008536" target="_blank" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-122285143-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-122285143-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=14"><span class="blog-title">岚殿的代码笔记</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-03</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					789
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_52008536/article/details/122285143" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.9&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-9-122285143-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;9&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_52008536/article/details/122285143&quot;}" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-122285143-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-9-122285143-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=14">
				<div class="desc ellipsis-online ellipsis-online-1">走进java

因为写程序本身就是一个不断追求完美的过程

优点

摆脱硬件限制

​	这个原理是为不同的硬件提供 不同的虚拟机，但是要求编译器提供相同的字节码，这个思想和JDBC如出一辙，向上提供接口，向下屏蔽差异，这对我们接口的设计要求还是比较高的，首先我们得统一出一套接口，这些接口再每个情况下都可以实现，然后这些接口又要足够的万能，程序员可以使用这些接口完成他们想操作的任何事情。但是，我们完全可以抽象出一个接口，来简化我们对接口的用运，没有哪个成功的开源框架可以离开接口的易用性
​	而且，不得不提的是</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_43215223/article/details/107144670">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_43215223/article/details/107144670" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.10&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10-107144670-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;10&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_43215223/article/details/107144670&quot;}" data-report-query="spm=1001.2101.3001.6650.10&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10-107144670-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10-107144670-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=15">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em>中<em>内存</em><em>物理</em>模型简单学习</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_43215223" target="_blank" data-report-query="spm=1001.2101.3001.6650.10&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10-107144670-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10-107144670-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=15"><span class="blog-title">weixin_43215223的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-15</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					44
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_43215223/article/details/107144670" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.10&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10-107144670-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;10&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_43215223/article/details/107144670&quot;}" data-report-query="spm=1001.2101.3001.6650.10&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10-107144670-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10-107144670-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=15">
				<div class="desc ellipsis-online ellipsis-online-1">一、<em>JVM</em>重要知识框架

<em>JVM</em><em>内存</em>模型（重要）
类加载机制（重要）
字节码执行机制（重要）
GC垃圾回收机制（重要）
<em>JVM</em>性能监控与故障定位（掌握）
<em>JVM</em>性能调优（详细的得实践了）


二、<em>JVM</em>的<em>物理</em><em>内存</em>模型
1. <em>物理</em><em>内存</em>模型


...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_38556197/article/details/117324432" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11-117324432-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_38556197/article/details/117324432&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_38556197/article/details/117324432" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11-117324432-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_38556197/article/details/117324432&quot;}" data-report-query="spm=1001.2101.3001.6650.11&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-117324432-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-117324432-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=16">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em><em>内存</em>区域详解（Eden Space、Survivor Space、Old Gen、Code Cache和Perm Gen）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_38556197" target="_blank" data-report-query="spm=1001.2101.3001.6650.11&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-117324432-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-117324432-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=16"><span class="blog-title">栗少的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-27</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					279
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_38556197/article/details/117324432" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-11-117324432-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_38556197/article/details/117324432&quot;}" data-report-query="spm=1001.2101.3001.6650.11&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-117324432-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-11-117324432-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=16">
				<div class="desc ellipsis-online ellipsis-online-1">参考文章：

https://www.cnblogs.com/redcreen/archive/2011/05/04/2037057.html

https://www.cnblogs.com/duanxz/p/3520829.html

一、<em>JVM</em><em>内存</em>分类

<em>JVM</em>区域总体分两类，heap区和非heap区。

heap区又分为：

Eden Space（伊甸园）、
	Survivor Space(幸存者区)、
	Old Gen（老年代）。
非heap区根据JDK版本的不同，分类有所不同，在Java 8之前</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://invincible.blog.csdn.net/article/details/109033166" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12-109033166-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://invincible.blog.csdn.net/article/details/109033166&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://invincible.blog.csdn.net/article/details/109033166" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12-109033166-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://invincible.blog.csdn.net/article/details/109033166&quot;}" data-report-query="spm=1001.2101.3001.6650.12&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-109033166-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-109033166-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=17">
					<div class="left ellipsis-online ellipsis-online-1">记一次线上<em>jvm</em>堆大小<em>设置</em>大于机器<em>内存</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/lbh199466" target="_blank" data-report-query="spm=1001.2101.3001.6650.12&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-109033166-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-109033166-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=17"><span class="blog-title">雪落南城的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-12</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					1351
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://invincible.blog.csdn.net/article/details/109033166" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-12-109033166-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://invincible.blog.csdn.net/article/details/109033166&quot;}" data-report-query="spm=1001.2101.3001.6650.12&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-109033166-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-12-109033166-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=17">
				<div class="desc ellipsis-online ellipsis-online-1">首先我想说，牛逼。
背景
由于一个服务迁移到了我们组，线上报了一个swap.used.percent = 100，然后观察gc日志发现了一个young gc时间达到12s的case
冷静分析
这个服务所在的机器配置是4c8g，讲道理，如果用到了swap，说明机器<em>内存</em>不足啊！

看了一下这个服务的堆<em>内存</em>大小是12G！

就，牛逼。
解决方案
1.升级机器
2.修改堆大小

...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_19320773/article/details/108126932" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13-108126932-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_19320773/article/details/108126932&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_19320773/article/details/108126932" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13-108126932-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_19320773/article/details/108126932&quot;}" data-report-query="spm=1001.2101.3001.6650.13&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-108126932-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-108126932-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=18">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em>学习笔记<em>-</em><em>JVM</em><em>内存</em>分配<em>问题</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_19320773" target="_blank" data-report-query="spm=1001.2101.3001.6650.13&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-108126932-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-108126932-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=18"><span class="blog-title">xiaoko81</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">08-20</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					203
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_19320773/article/details/108126932" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-13-108126932-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_19320773/article/details/108126932&quot;}" data-report-query="spm=1001.2101.3001.6650.13&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-108126932-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-13-108126932-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=18">
				<div class="desc ellipsis-online ellipsis-online-1">分代模型分为 老年代 年轻代 永久代

回收过程

当开始执行一个方法的时候，创建一个栈帧将其压入栈中，如图所示，当执行完成之后弹出栈帧，此时该栈帧与堆<em>内存</em>无关，所以回收线程可对堆<em>内存</em>实例化的资源进行回收


改造代码
此时我们将其改造一下

老年代与年轻代
将这个变量变成全局变量，此时，就会引出两个概念[年轻代]和[老年代]

年轻代就是创建很快就被回收的对象
老年代就是很久不被回收的对象
比如说案例一中不断新建不断回收<em>-</em>，就是一直在年轻代。
但是案例二创建了静态全局变量，这个对象一开始处于年轻代，不久之</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/cheya3213/article/details/100595911" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14-100595911-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/cheya3213/article/details/100595911&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/cheya3213/article/details/100595911" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14-100595911-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/cheya3213/article/details/100595911&quot;}" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-100595911-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-100595911-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=19">
					<div class="left ellipsis-online ellipsis-online-1">（翻译）<em>JVM</em>——Java<em>物理</em><em>内存</em>模型(JMM)及运行时<em>内存</em>模型</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/cheya3213" target="_blank" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-100595911-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-100595911-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=19"><span class="blog-title">cheya3213的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-30</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					296
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/cheya3213/article/details/100595911" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-14-100595911-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/cheya3213/article/details/100595911&quot;}" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-100595911-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-14-100595911-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=19">
				<div class="desc ellipsis-online ellipsis-online-1">本人翻译自http://tutorials.jenkov.com/java<em>-</em>concurrency/java<em>-</em>memory<em>-</em>model.html 
 
Java<em>内存</em>模型规定了<em>JVM</em>如何基于计算机<em>内存</em>工作。<em>JVM</em>就是一个完整的计算机模型因此这个模型中包含一个<em>内存</em>模型——AKA java<em>内存</em>模...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_35044419/article/details/120282870" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15-120282870-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_35044419/article/details/120282870&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_35044419/article/details/120282870" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15-120282870-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_35044419/article/details/120282870&quot;}" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120282870-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120282870-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=20">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em>堆<em>内存</em>（heap）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_35044419" target="_blank" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120282870-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120282870-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=20"><span class="blog-title">嗯哼的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-14</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					300
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_35044419/article/details/120282870" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15-120282870-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_35044419/article/details/120282870&quot;}" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120282870-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15-120282870-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=20">
				<div class="desc ellipsis-online ellipsis-online-1">堆的核心概述


一个<em>JVM</em>实例只存在一个堆<em>内存</em>，堆也是Java<em>内存</em>管理的核心区域。
	Java堆区在<em>JVM</em>启动的时候即被创建，其空间大小也就确定了。是<em>JVM</em>管理的最大1块<em>内存</em>空间。堆<em>内存</em>的大小是可以调节的。<em>-</em>Xms、<em>-</em><em>Xmx</em>表示初识堆空间大小和最大堆空间大小。
	《Java虚拟机规范》规定，堆可以处于<em>物理</em>上不连续的<em>内存</em>空间中，但在逻辑上它应该被视为连续的。
	所有的线程共享Java堆，在这里还可以划分线程私有的缓冲区(Thread Local Allocation Buffer, TLAB) 。
	《Ja</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_39940205/article/details/121479578" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16-121479578-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_39940205/article/details/121479578&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_39940205/article/details/121479578" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16-121479578-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_39940205/article/details/121479578&quot;}" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-121479578-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-121479578-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=21">
					<div class="left ellipsis-online ellipsis-online-1"><em>JVM</em><em>-</em>运行时<em>内存</em>篇</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_39940205" target="_blank" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-121479578-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-121479578-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=21"><span class="blog-title">江黎</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-22</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					204
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_39940205/article/details/121479578" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16-121479578-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_39940205/article/details/121479578&quot;}" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-121479578-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16-121479578-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=21">
				<div class="desc ellipsis-online ellipsis-online-1">程序计数器：是一个比较小的<em>内存</em>区域，其主要用于指示当前线程所执行的字节码执行到了第几行，可以理解为是当前线程的行号指示器。字节码解释器在工作时，会通过改变这个计数器的值来取下一条语句指令。 每个程序计数器只用来记录一个线程的行号，所以它是线程私有（一个线程就有一个程序计数器）的。

如果程序执行的是一个Java方法，则计数器记录的是正在执行的虚拟机字节码指令地址；如果正在执行的是一个本地（native，由C语言编写完成）方法，则计数器的值为Undefined，由于程序计数器只是记录当前指令地址，所以不存在内</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/huluwaaaa/article/details/102699837" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17-102699837-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/huluwaaaa/article/details/102699837&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/huluwaaaa/article/details/102699837" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17-102699837-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/huluwaaaa/article/details/102699837&quot;}" data-report-query="spm=1001.2101.3001.6650.17&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-102699837-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-102699837-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=22">
					<div class="left ellipsis-online ellipsis-online-1">如何在Java中分配<em>超过</em><em>-</em><em>Xmx</em>限制的<em>内存</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/huluwaaaa" target="_blank" data-report-query="spm=1001.2101.3001.6650.17&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-102699837-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-102699837-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=22"><span class="blog-title">ScutKevinYzy的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-27</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					891
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/huluwaaaa/article/details/102699837" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17-102699837-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/huluwaaaa/article/details/102699837&quot;}" data-report-query="spm=1001.2101.3001.6650.17&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-102699837-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17-102699837-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=22">
				<div class="desc ellipsis-online ellipsis-online-1">本文主要介绍Java中几种<em>分配内存</em>的方法。我们会看到如何使用sun.misc.Unsafe来统一操作任意类型的<em>内存</em>。以前用C语言开发的同学通常都希望能在Java中通过较底层的接口来操作<em>内存</em>，他们一定会对本文中要讲的内容感兴趣。
如果你对Java<em>内存</em>优化比较感兴趣，可以看下这篇文章，以及它的姊妹篇：一， 二。http://java<em>-</em>performance.info/memory<em>-</em>consumptio...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/kalogen/article/details/83734889" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.18&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18-83734889-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;18&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/kalogen/article/details/83734889&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/kalogen/article/details/83734889" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.18&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18-83734889-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;18&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/kalogen/article/details/83734889&quot;}" data-report-query="spm=1001.2101.3001.6650.18&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-83734889-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-83734889-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=23">
					<div class="left ellipsis-online ellipsis-online-1">sun <em>jvm</em>的最大<em>内存</em>限制，不<em>超过</em>2G</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/kalogen" target="_blank" data-report-query="spm=1001.2101.3001.6650.18&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-83734889-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-83734889-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=23"><span class="blog-title">kalogen的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-21</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					181
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/kalogen/article/details/83734889" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.18&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18-83734889-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;18&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/kalogen/article/details/83734889&quot;}" data-report-query="spm=1001.2101.3001.6650.18&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-83734889-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18-83734889-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=23">
				<div class="desc ellipsis-online ellipsis-online-1"><em>JVM</em>版本 最大<em>内存</em>(兆)client 最大<em>内存</em>(兆)server SUN 1.5.x 1492 1520 SUN 1.5.5(Linux) 2634 2660 SUN 1.4.2 1564 1564 SUN 1.4.2(Linux) 1900 1260 IBM 1.4.2(Linux) 2047 N/A BEA JRockit 1.5 (U3) 1909 1902 
&nbsp;
&nbsp;
对于使用sun...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://yexindong.blog.csdn.net/article/details/119052930" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.19&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-19-119052930-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;19&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://yexindong.blog.csdn.net/article/details/119052930&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://yexindong.blog.csdn.net/article/details/119052930" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.19&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-19-119052930-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;19&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://yexindong.blog.csdn.net/article/details/119052930&quot;}" data-report-query="spm=1001.2101.3001.6650.19&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119052930-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119052930-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=24">
					<div class="left ellipsis-online ellipsis-online-1"><em>jvm</em>调优技巧 <em>-</em> <em>内存</em>抖动 、Xms和<em>Xmx</em>参数为什么要<em>设置</em>相同的值</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_27184497" target="_blank" data-report-query="spm=1001.2101.3001.6650.19&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119052930-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119052930-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=24"><span class="blog-title">叶新东老师的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-24</span>
					<span class="info-block read"><img class="read-img" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					1036
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://yexindong.blog.csdn.net/article/details/119052930" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.19&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-19-119052930-blog-117816542.pc_relevant_aa\&quot;,\&quot;dist_request_id\&quot;:\&quot;1652768010672_76741\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1652768010672_76741&quot;,&quot;ab_strategy&quot;:&quot;default&quot;,&quot;index&quot;:&quot;19&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://yexindong.blog.csdn.net/article/details/119052930&quot;}" data-report-query="spm=1001.2101.3001.6650.19&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119052930-blog-117816542.pc_relevant_aa&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-19-119052930-blog-117816542.pc_relevant_aa&amp;utm_relevant_index=24">
				<div class="desc ellipsis-online ellipsis-online-1">前言
在网上看到大部分的帖子都有介绍性能调优的案例，其中有一项就是告诉你 Xms 和 <em>Xmx</em> 参数一定要<em>设置</em>成相同的，这样就可以达到优化的目的，就像这样
<em>-</em>Xms1024m <em>-</em><em>Xmx</em>1024m

但是却没说为什么要这么<em>设置</em>，那么这篇文章就是来告诉你这样<em>设置</em>的目的。底层做了哪些事情。
<em>jvm</em>性能调优的最基本条件
&nbsp;&nbsp;&nbsp;&nbsp;首先我们要知道，垃圾回收器（GC）在回收<em>内存</em>空间时候，所有的工作线程都会暂停，待回收工作完成后，工作线程才会继续运行。如果GC太频繁，工作线程的效率和响</div>
			</a>
		</div>
	</div>
</div>
            </div>
<div id="recommendNps" class="recommend-nps-box common-nps-box" style="display: block;">
  <h3 class="aside-title">“相关推荐”对你有帮助么？</h3>
  <div class="aside-content">
      <ul class="newnps-list">
          <li class="newnps-item" data-type="非常没帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel1.png" alt="">
                  <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey1.png" alt="">
              </div>
              <div class="newnps-text">非常没帮助</div>
          </li>
          <li class="newnps-item" data-type="没帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel2.png" alt="">
                  <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey2.png" alt="">
              </div>
              <div class="newnps-text">没帮助</div>
          </li>
          <li class="newnps-item" data-type="一般">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel3.png" alt="">
                  <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey3.png" alt="">
              </div>
              <div class="newnps-text">一般</div>
          </li>
          <li class="newnps-item" data-type="有帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel4.png" alt="">
                  <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey4.png" alt="">
              </div>
              <div class="newnps-text">有帮助</div>
          </li>
          <li class="newnps-item" data-type="非常有帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel5.png" alt="">
                  <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey5.png" alt="">
              </div>
              <div class="newnps-text">非常有帮助</div>
          </li>
      </ul>
      <div class="newnps-form-box">
      <div class="newnps-form">
          <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
          <span class="newnps-btn">提交</span>
      </div>
      </div>
  </div>
</div>            <div class="template-box">
                <span>©️2022 CSDN</span>
                <span>皮肤主题：大白</span>
                <span> 设计师：CSDN官方博客</span>
                <span>
                    <a href="https://blog.csdn.net/" class="back-home c-blue c-blue-hover c-blue-focus">返回首页</a>
                </span>
            </div>
<div class="blog-footer-bottom" style="margin-top:10px;">
        <div id="copyright-box" class="">
          <div id="csdn-copyright-footer" class="column small">
            <ul class="footer-column-t">
            <li>
              <a href="https://www.csdn.net/company/index.html#about" target="_blank">关于我们</a>
            </li>
            <li>
              <a href="https://www.csdn.net/company/index.html#recruit" target="_blank">招贤纳士</a>
            </li>
            <li><a href="https://marketing.csdn.net/questions/Q2202181741262323995" target="_blank">商务合作</a></li>
            <li><a href="https://marketing.csdn.net/questions/Q2202181748074189855" target="_blank">寻求报道</a></li>
            <li>
              <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/tel.png" alt="">
              <span>400-660-0108</span>
            </li>
            <li>
              <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/email.png" alt="">
              <a href="mailto:webmaster@csdn.net" target="_blank">kefu@csdn.net</a>
            </li>
            <li>
              <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/cs.png" alt="">
              <a href="https://csdn.s2.udesk.cn/im_client/?web_plugin_id=29181" target="_blank">在线客服</a>
            </li>
            <li>
              工作时间&nbsp;8:30-22:00
            </li>
          </ul>
            <ul class="footer-column-b">
            <li><img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/badge.png" alt=""><a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502030143" rel="noreferrer" target="_blank">公安备案号11010502030143</a></li>
            <li><a href="http://beian.miit.gov.cn/publish/query/indexFirst.action" rel="noreferrer" target="_blank">京ICP备19004658号</a></li>
            <li><a href="https://csdnimg.cn/release/live_fe/culture_license.png" rel="noreferrer" target="_blank">京网文〔2020〕1039-165号</a></li>
            <li><a href="https://csdnimg.cn/cdn/content-toolbar/csdn-ICP.png" target="_blank">经营性网站备案信息</a></li>
            <li><a href="http://www.bjjubao.org/" target="_blank">北京互联网违法和不良信息举报中心</a></li>
            <li><a href="https://download.csdn.net/tutelage/home" target="_blank">家长监护</a></li>
            <li><a href="http://www.cyberpolice.cn/" target="_blank">网络110报警服务</a></li>
            <li><a href="http://www.12377.cn/" target="_blank">中国互联网举报中心</a></li>
            <li><a href="https://chrome.google.com/webstore/detail/csdn%E5%BC%80%E5%8F%91%E8%80%85%E5%8A%A9%E6%89%8B/kfkdboecolemdjodhmhmcibjocfopejo?hl=zh-CN" target="_blank">Chrome商店下载</a></li>
            <li>©1999-2022北京创新乐知网络技术有限公司</li>
            <li><a href="https://www.csdn.net/company/index.html#statement" target="_blank">版权与免责声明</a></li>
            <li><a href="https://blog.csdn.net/blogdevteam/article/details/90369522" target="_blank">版权申诉</a></li>
            <li><a href="https://img-home.csdnimg.cn/images/20210414021151.jpg" target="_blank">出版物许可证</a></li>
            <li><a href="https://img-home.csdnimg.cn/images/20210414021142.jpg" target="_blank">营业执照</a></li>
          </ul>
          </div>
        </div>
      </div>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/csdn-footer.js.下载" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>        </main>
<aside class="blog_container_aside">
<div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://blog.csdn.net/mutian6655" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4121&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655&quot;,&quot;ab&quot;:&quot;new&quot;}">
                <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/3_mutian6655" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://blog.csdn.net/mutian6655" target="_blank" class="" id="uid" title="明谨" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4122&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <span class="name " username="mutian6655">明谨</span>
                </a>
                <span>
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years" title="已加入 CSDN 15年">码龄15年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="暂无认证">
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/nocErtification.png" alt="">
                    暂无认证
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="9">
            <a href="https://blog.csdn.net/mutian6655" data-report-click="{&quot;mod&quot;:&quot;1598321000_001&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4310&quot;}" data-report-query="t=1">  
                <dt><span class="count">9</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click="{&quot;mod&quot;:&quot;1598321000_002&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4311&quot;}" title="193313">
            <a href="https://blog.csdn.net/rank/list/weekly" target="_blank">
                <dt><span class="count">19万+</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="422126">
            <a href="https://blog.csdn.net/rank/list/total" data-report-click="{&quot;mod&quot;:&quot;1598321000_003&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4312&quot;}" target="_blank">
                <dt><span class="count">42万+</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="11996">  
            <dt><span class="count">1万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="2级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/blogdevteam/article/details/103478461" target="_blank">
                <img class="level" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/blog2.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="164">
            <dt><span class="count">164</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="3">
            <dt><span class="count" id="fan">3</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="8">
            <dt><span class="count">8</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="8">
            <dt><span class="count">8</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="8">
            <dt><span class="count">8</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer">
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="新人勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/blinknewcomer@240.png" alt="新人勋章">
                    </div>
                </div>
                <div class="icon-badge" title="阅读者勋章Lv2">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/yuedu7@240.png" alt="阅读者勋章Lv2">
                    </div>
                </div>
                <div class="icon-badge" title="勤写标兵Lv1">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/qixiebiaobing1@240.png" alt="勤写标兵Lv1">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a class="bt-button personal-letter" href="https://im.csdn.net/chat/mutian6655" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent">关注</a>  
        </div>
    </div>
</div>
 <div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog">
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/csdn-sou.png">
        </a>
    </div>
    </div>
</div>


<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://blog.csdn.net/mutian6655/article/details/103359544" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/103359544&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Seata 0.8.1 当执行batch修改时报Unable to commit against JDBC Connection问题
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					<span class="read">2599</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/mutian6655/article/details/117816542" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/117816542&quot;,&quot;ab&quot;:&quot;new&quot;}">
				JVM -Xmx内存设置超过物理内存问题思考
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					<span class="read">2499</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/mutian6655/article/details/102877612" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/102877612&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Vue Build后的项目的根路径配置问题
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					<span class="read">2467</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/mutian6655/article/details/104345612" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/104345612&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Oracle VM VirtualBox 虚拟硬盘扩容（Linux）
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					<span class="read">2143</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/mutian6655/article/details/112758278" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/112758278&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Nexus因异常重启导致OrientDB数据库变为只读的问题修复
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/readCountWhite.png" alt="">
					<span class="read">980</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideCategory" class="aside-box flexible-box">
    <h3 class="aside-title">分类专栏</h3>
    <div class="aside-content">
        <ul>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9577298.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9577298.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222155031212(1).png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        Java
                    </span>
                </a>
                <span class="special-column-num">3篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9577299.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9577299.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/2020022215503880.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        SpringBoot
                    </span>
                </a>
                <span class="special-column-num">1篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9561549.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9561549.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222153459431.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        Seata
                    </span>
                </a>
                <span class="special-column-num">1篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9480512.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9480512.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222155044125.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        WEB前端
                    </span>
                </a>
                <span class="special-column-num">2篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9480524.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9480524.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222155049233.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        Vue
                    </span>
                </a>
                <span class="special-column-num">2篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9724809.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9724809.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222153527149.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        虚拟机
                    </span>
                </a>
                <span class="special-column-num">1篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9524242.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9524242.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222153540735.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        Linux
                    </span>
                </a>
                <span class="special-column-num">1篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_10746414.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_10746414.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20210117213306999.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        Nexus
                    </span>
                </a>
                <span class="special-column-num">1篇</span>
            </li>
        </ul>
    </div>
    <p class="text-center">
        <a class="flexible-btn" data-fbox="aside-archive"><img class="look-more" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/arrowDownWhite.png" alt=""></a>
    </p>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/mutian6655/article/details/112758278#comments_20791937" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/112758278#comments_20791937&quot;,&quot;ab&quot;:&quot;new&quot;}">Nexus因异常重启导致OrientDB数据库变为只读的问题修复</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/tyw865349411" class="user-name" target="_blank">tyw865349411: </a>
                    <span class="code-comments">真实有效！赞！<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/062.png" alt="表情包"></span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/mutian6655/article/details/104345612#comments_17791929" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/104345612#comments_17791929&quot;,&quot;ab&quot;:&quot;new&quot;}">Oracle VM VirtualBox 虚拟硬盘扩容（Linux）</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/weixin_37806591" class="user-name" target="_blank">玉米烙不加玉米谢谢: </a>
                    <span class="code-comments">顺利扩容，非常感谢！</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/mutian6655/article/details/117816542#comments_16996320" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/117816542#comments_16996320&quot;,&quot;ab&quot;:&quot;new&quot;}">JVM -Xmx内存设置超过物理内存问题思考</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/TAaron666" class="user-name" target="_blank">旺仔OO糖: </a>
                    <span class="code-comments">冲冲冲</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/mutian6655/article/details/103359544#comments_13284001" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/103359544#comments_13284001&quot;,&quot;ab&quot;:&quot;new&quot;}">Seata 0.8.1 当执行batch修改时报Unable to commit against JDBC Connection问题</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/mutian6655" class="user-name" target="_blank">明谨: </a>
                    <span class="code-comments">查一下服务器端的报错</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/mutian6655/article/details/103359544#comments_13264561" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/103359544#comments_13264561&quot;,&quot;ab&quot;:&quot;new&quot;}">Seata 0.8.1 当执行batch修改时报Unable to commit against JDBC Connection问题</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_41617848" class="user-name" target="_blank">夏天的风€&amp;^_^: </a>
                    <span class="code-comments">有可能是版本问题，升级一下到1.x版本 这个bug被修复了</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewNps" class="aside-box common-nps-box" style="display: block;">
    <h3 class="aside-title">您愿意向朋友推荐“博客详情页”吗？</h3>
    <div class="aside-content">
        <ul class="newnps-list">
            <li class="newnps-item" data-type="强烈不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel1.png" alt="">
                    <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey1.png" alt="">
                </div>
                <div class="newnps-text">强烈不推荐</div>
            </li>
            <li class="newnps-item" data-type="不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel2.png" alt="">
                    <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey2.png" alt="">
                </div>
                <div class="newnps-text">不推荐</div>
            </li>
            <li class="newnps-item" data-type="一般般">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel3.png" alt="">
                    <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey3.png" alt="">
                </div>
                <div class="newnps-text">一般般</div>
            </li>
            <li class="newnps-item" data-type="推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel4.png" alt="">
                    <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey4.png" alt="">
                </div>
                <div class="newnps-text">推荐</div>
            </li>
            <li class="newnps-item" data-type="强烈推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeel5.png" alt="">
                    <img class="newnps-img default" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/npsFeelGrey5.png" alt="">
                </div>
                <div class="newnps-text">强烈推荐</div>
            </li>
        </ul>
        <div class="newnps-form-box">
        <div class="newnps-form">
            <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
            <span class="newnps-btn">提交</span>
        </div>
        </div>
    </div>
</div>
<div id="asideArchive" class="aside-box" style="display:block!important; width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://blog.csdn.net/mutian6655/article/details/117824234" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/117824234&quot;,&quot;ab&quot;:&quot;new&quot;}">因JIT引起的Thread.sleep滞后问题</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/mutian6655/article/details/112758278" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/112758278&quot;,&quot;ab&quot;:&quot;new&quot;}">Nexus因异常重启导致OrientDB数据库变为只读的问题修复</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/mutian6655/article/details/104345612" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/article/details/104345612&quot;,&quot;ab&quot;:&quot;new&quot;}">Oracle VM VirtualBox 虚拟硬盘扩容（Linux）</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-list-item"><a href="https://blog.csdn.net/mutian6655?type=blog&amp;year=2021&amp;month=06" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655?type=blog&amp;year=2021&amp;month=06&quot;}"><span class="year">2021年</span><span class="num">3篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/mutian6655?type=blog&amp;year=2020&amp;month=02" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655?type=blog&amp;year=2020&amp;month=02&quot;}"><span class="year">2020年</span><span class="num">1篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/mutian6655?type=blog&amp;year=2019&amp;month=12" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655?type=blog&amp;year=2019&amp;month=12&quot;}"><span class="year">2019年</span><span class="num">5篇</span></a></div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><!-- google -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-1076724771190722" data-ad-slot="1894159733" data-ad-format="auto" data-full-width-responsive="true" data-adsbygoogle-status="done">
  <!-- 插入 万维广告 2-1 -->
  <div class="wwads-cn wwads-vertical" data-id="149" style="margin-top: 0;margin-bottom: 8px;background-color: #fff;max-width:300px;" id="wwads-cn-149"></div>
  <!-- 插入 万维广告 3-1 -->
</ins>

<script async="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/f(3).txt" crossorigin="anonymous" data-checked-head="true"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({});
</script>

<!-- 插入 万维广告 3-2 -->
<script type="text/javascript" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/makemoney.js.下载" async=""></script>
<!-- 插入 万维广告 3-2 -->

<!-- 插入 万维广告 3-3 -->
<style>
  ins.adsbygoogle > .wwads-cn {
    display: none !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] {
    height: auto !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] > * {
    display: none !important;
  }
  ins.adsbygoogle[data-ad-status='unfilled'] > .wwads-cn {
    display: block !important;
    text-align: center; /* 万维广告局中 */
  }
</style>
<!-- 插入 万维广告 3-3 --><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&amp;adId=707&amp;a=707&amp;c=0&amp;k=JVM -Xmx内存设置超过物理内存问题思考&amp;spm=1001.2101.3001.5001&amp;articleId=117816542&amp;d=1&amp;t=3&amp;u=56b95411d19f4bb7af3f2c49ab411c16" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class="groupfile" id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"><ol><li class="active"><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t0">文章目录</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t1">问题提出</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t2">理论思考</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t3">1. 是否可以设置-Xmx超过物理内存？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t4">2. 是否可以将-Xmx设置的无限大？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t5">3. 当物理机内存耗尽时，会发生什么现象？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t6">4. JVM在堆内存不足和物理内存耗尽时会发生什么？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t7">5. JVM会因为临近物理内存大小而发生GC吗</a></li></ol></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t8">问题验证</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t9">测试代码</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t10">测试Xmx最大值</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t11">测试内存溢出</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t12">测试GC现象</a></li></ol></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t13">其他说明</a></li></ol></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-tooltip.js.下载"></script>
<script type="text/javascript" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-medal.js.下载"></script>    </div>
<div class="recommend-right align-items-stretch clearfix" id="rightAside" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right">
                        <div class="flex-column aside-box groupfile" id="groupfile" style="display: block; max-height: 440.5px;">
                <div class="groupfile-div" style="max-height: 440.5px;">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"><ol><li class="active"><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t0">文章目录</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t1">问题提出</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t2">理论思考</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t3">1. 是否可以设置-Xmx超过物理内存？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t4">2. 是否可以将-Xmx设置的无限大？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t5">3. 当物理机内存耗尽时，会发生什么现象？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t6">4. JVM在堆内存不足和物理内存耗尽时会发生什么？</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t7">5. JVM会因为临近物理内存大小而发生GC吗</a></li></ol></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t8">问题验证</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t9">测试代码</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t10">测试Xmx最大值</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t11">测试内存溢出</a></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t12">测试GC现象</a></li></ol></li><li class=""><a href="https://blog.csdn.net/mutian6655/article/details/117816542#t13">其他说明</a></li></ol></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
                <div id="recommendAdBox">
                    <div id="kp_box_479" data-pid="479"><iframe src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/saved_resource.html" frameborder="0" width="300px" height="600px" scrolling="no"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=479&amp;adId=6219&amp;a=6219&amp;c=9350&amp;k=JVM -Xmx内存设置超过物理内存问题思考&amp;spm=1001.2101.3001.4834&amp;articleId=117816542&amp;hk=1&amp;d=1&amp;t=3&amp;u=3993e05a1ebb49cd8cb00b05876bc75a" style="display: block;width: 0px;height: 0px;" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/1.png"></div>
                </div>
            <div class="aside-box kind_person d-flex flex-column">
                    <h3 class="aside-title">分类专栏</h3>
                    <div class="align-items-stretch kindof_item" id="kind_person_column">
                        <div class="aside-content">
                            <ul>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9577298.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9577298.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222155031212(1).png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            Java
                                        </span>
                                    </a>
                                    <span class="special-column-num">3篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9577299.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9577299.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/2020022215503880.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            SpringBoot
                                        </span>
                                    </a>
                                    <span class="special-column-num">1篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9561549.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9561549.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222153459431.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            Seata
                                        </span>
                                    </a>
                                    <span class="special-column-num">1篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9480512.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9480512.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222155044125.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            WEB前端
                                        </span>
                                    </a>
                                    <span class="special-column-num">2篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9480524.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9480524.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222155049233.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            Vue
                                        </span>
                                    </a>
                                    <span class="special-column-num">2篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9724809.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9724809.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222153527149.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            虚拟机
                                        </span>
                                    </a>
                                    <span class="special-column-num">1篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_9524242.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_9524242.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20200222153540735.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            Linux
                                        </span>
                                    </a>
                                    <span class="special-column-num">1篇</span>
                                </li>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/mutian6655/category_10746414.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655/category_10746414.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/20210117213306999.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            Nexus
                                        </span>
                                    </a>
                                    <span class="special-column-num">1篇</span>
                                </li>
                            </ul>
                        </div>
                    </div>
            </div>
        </div>
    </aside>
</div>



</div>
<div class="mask-dark"></div>
<script type="text/javascript">
    var timert = setInterval(function() {
      sideToolbar = $(".csdn-side-toolbar");
      if (sideToolbar.length > 0) {
        sideToolbar.css('cssText','bottom:64px !important;')
        clearInterval(timert);
      }
    }, 200);
</script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/sandalstrap.min.js.下载"></script>
<div class="skin-boxshadow"></div>
<div class="directory-boxshadow"></div>
<div id="rewardNew" class="reward-popupbox-new">
	<p class="rewad-title">打赏作者<span class="reward-close"><img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/closeBt.png"></span></p>
	<dl class="profile-box">
		<dd>
		<a href="https://blog.csdn.net/mutian6655" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/mutian6655&quot;,&quot;ab&quot;:&quot;new&quot;}">
			<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/3_mutian6655" class="avatar_pic">
		</a>
		</dd>
		<dt>
			<p class="blog-name">明谨</p>
			<p class="blog-discript">你的鼓励将是我创作的最大动力</p>
		</dt>
	</dl>
	<div class="reward-box-new">
			<div class="reward-content"><div class="reward-right"></div></div>
	</div>
	<div class="money-box">
				<span class="choose-money choosed" data-id="2">¥2</span>
				<span class="choose-money " data-id="4">¥4</span>
				<span class="choose-money " data-id="6">¥6</span>
				<span class="choose-money " data-id="10">¥10</span>
				<span class="choose-money " data-id="20">¥20</span>
				<input id="customizeMoney" class="customize-money" name="" type="" value="" placeholder="自定义">
				<div class="customize-tip">输入1-500的整数</div>
	</div>
	<div class="pay-box">
		<div class="pay-type-blance pay-type active" data-type="blance">
			<img class="unchoose" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newUnChoose.png" alt="">
			<img class="choose" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newChoose.png" alt="">
			<span class="pay-type-name">余额支付</span>
			<span class="pay-type-num">(余额：-- )</span>
		</div>
		<div class="pay-type-money pay-type" data-type="money">
			<img class="unchoose" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newUnChoose.png" alt="">
			<img class="choose" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newChoose.png" alt="">
			<span class="pay-type-name">扫码支付</span>
		</div>
	</div>
	<div class="sure-box">
		<div class="sure-box-money">
			<div class="code-box">
				<div class="code-num-box">
					<span class="code-name">扫码支付：</span><span class="code-num">¥2</span>
				</div>
				<div class="code-img-box">
					<div class="renovate">
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/pay-time-out.png">
					<span>获取中</span>
					</div>
				</div>
				<div class="code-pay-box">
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newWeiXin.png" alt="">
					<img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/newZhiFuBao.png" alt="">
					<span>扫码支付</span>
				</div>
			</div>
		</div>
		<div class="sure-box-blance">
			<p class="tip">您的余额不足，请更换扫码支付或<a target="_blank" data-report-click="{&quot;mod&quot;:&quot;1597646289_003&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4302&quot;}" href="https://i.csdn.net/#/wallet/balance/recharge?utm_source=RewardVip" class="go-invest">充值</a></p>
			<p class="is-have-money"><a class="reward-sure">打赏作者</a></p>
		</div>
	</div>
</div>
<div class="pay-code">
    <div class="pay-money">实付<span class="pay-money-span" data-nowprice="" data-oldprice="">元</span></div>
    <div class="content-blance"><a class="blance-bt" href="javascript:;">使用余额支付</a></div>
    <div class="content-code">
    <div id="payCode" data-id="">
            <div class="renovate">
                <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/pay-time-out.png">
                <span>点击重新获取</span>
            </div>
        </div>
        <div class="pay-style"><span><img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/weixin.png"></span><span><img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/zhifubao.png"></span><span><img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/jingdong.png"></span><span class="text">扫码支付</span></div>
    </div>
    <div class="bt-close"><svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12"><defs><style type="text/css"></style></defs><path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path></svg></div>
    <!-- <p style="margin-top: 8px;font-size: 14px;" class="text-center">支付成功即可阅读</p> -->
    <div class="pay-balance">
    <input type="radio" class="pay-code-radio" data-type="details"> 
    <span class="span">钱包余额</span>
    <span class="balance" style="color:#FC5531;font-size:14px;">0</span>  
    <div class="pay-code-tile">
        <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/pay-help.png" alt="">
        <div class="pay-code-content">
            <div class="span">
                <p class="title">抵扣说明：</p>
                <p> 1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。<br> 2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。</p>
            </div>
        </div>
    </div>
    </div>
    <a class="pay-balance-con" href="https://i.csdn.net/#/wallet/balance/recharge" target="_blank"><img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/recharge.png" alt=""><span>余额充值</span></a>
</div>
<div style="display:none;">
	<img src="https://blog.csdn.net/mutian6655/article/details/117816542" onerror="setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href=&quot;\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74&quot;}},3000);">
</div>
<div class="keyword-dec-box" id="keywordDecBox" style="display: none;"></div>

<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/pc_wap_highlight-7e7de84184.min.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/pc_wap_common-fbcbe8567e.min.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/edit_copy_code-9c83e748f5.min.js.下载" type="text/javascript"></script>
<link rel="stylesheet" href="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/atom-one-light.css">
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-accusation.js.下载" type="text/javascript"></script>
<script>
 // 全局声明
 if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
        options: {
            report:{
                isShow: true,
            },
            qr: {
                isShow: false,
            },
            guide: {
                isShow: true
            }
        }
    }
    $(function(){
        $(document).on('click',"a.option-box[data-type='report']",function() {
            window.csdn.userLogin.loadAjax(function(res){
                window.csdn.feedback({
                    "type":'blog',
                    "rtype":'article',
                    "rid":articleId,
                    "reportedName":username,
                    "submitOptions":{
                        "title":articleTitle,
                        "contentUrl":articleDetailUrl
                    },
                    "callback":function(){
                        showToast({
                            text: "感谢您的举报，我们会尽快审核！",
                            bottom: '10%', 
                            zindex: 9000, 
                            speed: 500,
                            time: 1500
                        });
                    }
                })
            })
        });
    })
</script>
    <script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/baidu-search.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/qrcode.js.下载"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/qrcode.min.js.下载"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-ordercart.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/user-ordertip.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/order-payment.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/common-a1dfbf1dc3.min.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/detail-d3f2acaead.min.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/column-021ccc1be7.min.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/side-toolbar.js.下载" type="text/javascript"></script>
<script src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/copyright.js.下载" type="text/javascript"></script>
<script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
        $('div.markdown_views')[0].className = 'markdown_views';
    }
</script>
<script type="text/javascript" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/MathJax.js.下载"></script>
<script type="text/x-mathjax-config;executed=true">
    MathJax.Hub.Config({
            "HTML-CSS": {
                    linebreaks: { automatic: true, width: "94%container" },
                    imageFont: null
            },
            tex2jax: {
                preview: "none",
                ignoreClass:"title-article"
            },
            mml2jax: {
                preview: 'none'
            }
    });
</script>
<script type="text/javascript" crossorigin="" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/csdn-login-box.js.下载"></script>
<div id="pointDivs"><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div></div><div id="st_mask" onclick="closeMask()" style="width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); position: fixed; left: 0px; top: 0px; display: none; z-index: 1;"></div><div id="st_confirmBox" style="width: 360px; position: fixed; text-align: left; display: none; z-index: 100; inset: 0px; height: 208px; margin: auto;"><div id="st_confirm" style="background: rgb(255, 255, 255); border-radius: 4px; overflow: hidden; padding: 24px; width: 360px; height: 208px;"><span id="st_confirm_tit" style="width: 100%; max-height: 24px; font-size: 18px; font-weight: 500; color: rgb(34, 34, 38); line-height: 24px; text-align: left; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span><span id="st_confirm_text" style="text-align: left; height: 44px; font-size: 14px; font-weight: 400; color: rgb(85, 86, 102); line-height: 22px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; text-overflow: ellipsis; -webkit-line-clamp: 2; margin-top: 16px; margin-bottom: 40px;"></span><span class="st_confirm_btn success" style="background: rgb(252, 85, 51); color: rgb(255, 255, 255); text-align: center; display: block; width: 88px; height: 36px; line-height: 36px; margin-left: 16px; float: right; border-radius: 18px;">确定</span><span class="st_confirm_btn cancel" style="color: rgb(34, 34, 38); text-align: center; display: block; width: 88px; height: 36px; line-height: 36px; margin-left: 16px; float: right; box-sizing: border-box; border: 1px solid rgb(204, 204, 216); border-radius: 18px;">取消</span><span id="st_confirm_close" style="display: block; width: 12px; height: 12px; position: absolute; text-align: center; z-index: 100; top: 24px; right: 24px;"><img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/closeBt.png" style="display: block; width: 12px; height: 12px;"></span><div style="clear: both; display: block;"></div></div></div><div id="st_alertBox" style="width: 100%; position: fixed; left: 0px; top: 34%; text-align: center; display: none; z-index: 2;"><div id="st_alert" style="width: 80%; margin: 0px auto; background: rgb(255, 255, 255); border-radius: 2px; overflow: hidden; padding-top: 20px; text-align: center;"><span id="st_alert_text" style="background: rgb(255, 255, 255); overflow: hidden; padding: 15px 8px 30px; text-align: center; display: block;"></span><span id="st_alert_btn" onclick="closeMask()" style="background: rgb(27, 121, 248); color: rgb(255, 255, 255); padding: 8px; text-align: center; display: block; width: 72%; margin: 0px auto 20px; border-radius: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span></div></div><div id="st_toastBox" style="width: 100%; position: fixed; left: 0px; bottom: 10%; text-align: center; display: none;"><span id="st_toastContent" style="color: rgb(255, 255, 255); background: rgba(0, 0, 0, 0.8); padding: 8px 24px; border-radius: 4px; max-width: 80%; display: inline-block; font-size: 16px;"></span></div> <div class="report-box">  <div class="pos-boxer">      <div class="pos-content">          <div class="box-title">              <p>举报</p>              <img class="icon btn-close" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/closeBlack.png">          </div>          <div class="box-header">              <div class="box-top"><span>选择你想要举报的内容（必选）</span></div>              <div class="box-botoom">                  <ul>                      <li data="1" type="nei">内容涉黄</li>                      <li data="2" type="nei">政治相关</li>                      <li data="3" type="nei">内容抄袭</li>                      <li data="4" type="nei">涉嫌广告</li>                      <li data="5" type="nei">内容侵权</li>                      <li data="6" type="nei">侮辱谩骂</li>                      <li data="8" type="nei">样式问题</li>                      <li data="7" type="nei">其他</li>                  </ul>              </div>          </div>          <div>          <div class="box-content">          </div>          <div class="box-content">          </div>                    <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>原文链接（必填）</span>                      </div>                      <div class="box-content-bottom" style="padding-bottom: 16px;">                        <div class="box-input" style="height: 32px;line-height: 32px;">                        <input class="content-input" type="text" id="originalurl" name="originalurl" placeholder="请输入被侵权原文链接">                        </div>                      </div>          </div>          <div class="box-content">          </div>          <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>请选择具体原因（必选）</span>                      </div>                  <div class="box-content-bottom">                          <ul>                              <li sub_type="1">包含不实信息</li>                              <li sub_type="2">涉及个人隐私</li>                          </ul>                      </div>          </div>          <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>请选择具体原因（必选）</span>                      </div>                  <div class="box-content-bottom">                          <ul>                              <li sub_type="1">侮辱谩骂</li>                              <li sub_type="2">诽谤</li>                          </ul>                  </div>          </div>          <div class="box-content" style="display:none;">                <div class="box-content-top">                        <span>请选择具体原因（必选）</span>                    </div>                <div class="box-content-bottom">                        <ul>                            <li sub_type="1">搬家样式</li>                            <li sub_type="2">博文样式</li>                        </ul>                </div>          </div>          <div class="box-content" style="display:none;">          </div>          </div>            <div id="cllcont" style="display:none;">            <div class="box-content-top">              <span class="box-content-span">补充说明（选填）</span>            </div>                <div class="box-content-bottom">                  <div class="box-input">                    <textarea class="ipt ipt-textarea" style="padding:0;" name="description" placeholder="请详细描述您的举报内容"></textarea>                  </div>                </div>            </div>            </div>      <div class="pos-footer">          <p class="btn-close">取消</p>          <p class="box-active">确定</p>      </div>  </div></div><svg aria-hidden="true" style="position: absolute; width: 0px; height: 0px; overflow: hidden;"><symbol id="sousuo" viewBox="0 0 1024 1024"><path d="M719.6779726 653.55865555l0.71080936 0.70145709 191.77828505 191.77828506c18.25658185 18.25658185 18.25658185 47.86273439 0 66.12399318-18.26593493 18.26125798-47.87208744 18.26125798-66.13334544 0l-191.77828505-191.77828506c-0.2338193-0.2338193-0.4676378-0.4676378-0.69678097-0.71081014-58.13206223 44.25257003-130.69075187 70.51978897-209.38952657 70.51978894C253.06424184 790.19776156 98.14049639 635.27869225 98.14049639 444.17380511S253.06424184 98.14049639 444.16912898 98.14049639c191.10488633 0 346.02863258 154.92374545 346.02863259 346.02863259 0 78.6987747-26.27189505 151.25746514-70.51978897 209.38952657z m-275.50884362 43.11621045c139.45428506 0 252.50573702-113.05145197 252.50573702-252.50573702s-113.05145197-252.50573702-252.50573702-252.50573783-252.50573702 113.05145197-252.50573783 252.50573783 113.05145197 252.50573702 252.50573783 252.50573702z"></path></symbol><symbol id="gonggong_csdnlogo_" viewBox="0 0 4096 1024"><path d="M1234.16069807 690.46341551c62.96962316 23.02318413 194.30703694 45.91141406 300.51598128 45.91141406 114.44114969 0 178.13952547-31.68724287 183.2407937-80.86454822 4.642424-44.8587714-42.21366937-50.93170978-171.44579784-81.53931916-178.57137886-43.77913792-292.49970264-111.55313011-281.32549604-219.86735976 12.9825927-125.75031047 181.27046257-220.78504823 439.49180199-220.78504822 125.88526465 0 247.93783044 8.87998544 311.17736197 29.60894839l-21.7006331 158.57116851c-41.05306337-14.27815288-198.1937175-34.11641822-304.48363435-34.11641822-107.7744129 0-163.56447339 33.90049151-167.42416309 71.06687432-4.85835069 47.04502922 51.14763648 49.23128703 191.14910897 86.50563321 189.58364043 48.09767188 272.47250144 115.81768239 261.6221849 220.81203906-12.71268432 123.51007099-164.13128096 228.53141851-466.48263918 228.53141851-125.85827383 0-234.33444849-22.96920244-294.09216204-45.93840492l19.730302-157.86940672zM3010.8325562 172.75216735c688.40130256-129.79893606 747.80813523 103.42888812 726.53935551 309.80082928l-40.08139323 381.78539207h-218.51781789l36.57258439-348.20879061c7.90831529-76.68096846 57.13960232-226.66905073-180.54170997-221.05495659-82.26807176 1.99732195-123.05122675 13.2794919-123.05122677 13.27949188s-7.15257186 92.65954408-15.81663059 161.13529804l-41.43093509 394.84895728h-214.3072473l42.53755943-389.15389062 28.09746151-302.43233073z m-869.48282929-18.05687008c49.12332368-5.34418577 124.58970448-10.76934404 228.45044598-10.76934405 173.38913812 0 313.57954648 30.17575597 400.38207891 93.63121421 77.94953781 59.16391512 129.82592689 154.95439631 115.4668015 293.74128117-13.25250106 129.15115596-80.405704 219.57046055-178.16651631 275.4954752-89.44763445 52.74009587-202.16137055 75.27744492-371.66382812 75.27744493-99.94707012 0-195.27870708-5.39816743-267.77609576-16.14052064L2141.37671774 154.69529727z m143.26736381 569.85754561c16.70732823 3.23890047 38.67786969 6.45081009 81.99816339 6.45081009 173.44311979 0 295.7386031-85.23706385 308.01943403-205.07638097 17.84094339-173.2271931-90.63523129-233.79463176-273.39018992-232.74198912-23.67096422 0-56.57279475 0-73.98188473 3.1849188l-42.6725136 428.15565036z" fill="#262626"></path><path d="M1109.8678928 870.30336371c-41.10704503 14.25116203-126.26313639 23.96786342-245.23874671 23.96786342-342.13585224 0-526.8071603-160.59548129-504.97157302-372.90540663C385.78470347 268.40769434 659.36382925 126.08500985 958.9081404 126.08500985c116.00661824 0 184.32042718 9.33882968 248.31570215 24.99351522l-20.5400271 170.42014604c-42.56455024-14.33213455-142.32268451-27.50366309-223.07926938-27.50366311-176.25016686 0-325.94134993 52.49717834-343.10752238 218.57179958-15.30380469 148.50358623 89.7715245 219.48948804 288.04621451 219.48948804 69.0155707 0 170.77102691-9.8786464 217.81605614-24.15679928l-16.49140154 162.40386737z" fill="#CA0C16"></path></symbol><symbol id="gonggong_csdnlogodanse_" viewBox="0 0 4096 1024"><path d="M1229.41995733 690.46341551c62.96962316 23.02318413 194.30703694 45.91141406 300.51598128 45.91141406 114.44114969 0 178.13952547-31.68724287 183.2407937-80.86454822 4.642424-44.8587714-42.21366937-50.93170978-171.44579784-81.53931916-178.57137886-43.77913792-292.49970264-111.55313011-281.32549604-219.86735976 12.9825927-125.75031047 181.27046257-220.78504823 439.49180199-220.78504822 125.88526465 0 247.93783044 8.87998544 311.17736197 29.60894839l-21.7006331 158.57116851c-41.05306337-14.27815288-198.1937175-34.11641822-304.48363435-34.11641822-107.7744129 0-163.56447339 33.90049151-167.42416309 71.06687432-4.85835069 47.04502922 51.14763648 49.23128703 191.14910897 86.50563321 189.58364043 48.09767188 272.47250144 115.81768239 261.6221849 220.81203906-12.71268432 123.51007099-164.13128096 228.53141851-466.48263918 228.53141851-125.85827383 0-234.33444849-22.96920244-294.09216204-45.93840492l19.730302-157.86940672zM3006.09181546 172.75216735c688.40130256-129.79893606 747.80813523 103.42888812 726.53935551 309.80082928l-40.08139323 381.78539207h-218.51781789l36.57258439-348.20879061c7.90831529-76.68096846 57.13960232-226.66905073-180.54170997-221.05495659-82.26807176 1.99732195-123.05122675 13.2794919-123.05122677 13.27949188s-7.15257186 92.65954408-15.81663059 161.13529804l-41.43093509 394.84895728h-214.3072473l42.53755943-389.15389062 28.09746151-302.43233073z m-869.48282929-18.05687008c49.12332368-5.34418577 124.58970448-10.76934404 228.45044598-10.76934405 173.38913812 0 313.57954648 30.17575597 400.38207891 93.63121421 77.94953781 59.16391512 129.82592689 154.95439631 115.4668015 293.74128117-13.25250106 129.15115596-80.405704 219.57046055-178.16651631 275.4954752-89.44763445 52.74009587-202.16137055 75.27744492-371.66382812 75.27744493-99.94707012 0-195.27870708-5.39816743-267.77609576-16.14052064L2136.635977 154.69529727z m143.26736381 569.85754561c16.70732823 3.23890047 38.67786969 6.45081009 81.99816339 6.45081009 173.44311979 0 295.7386031-85.23706385 308.01943403-205.07638097 17.84094339-173.2271931-90.63523129-233.79463176-273.39018992-232.74198912-23.67096422 0-56.57279475 0-73.98188473 3.1849188l-42.6725136 428.15565036z m-1174.74919792 145.75052083c-41.10704503 14.25116203-126.26313639 23.96786342-245.23874671 23.96786342-342.13585224 0-526.8071603-160.59548129-504.97157303-372.90540663C381.04396273 268.40769434 654.62308851 126.08500985 954.16739966 126.08500985c116.00661824 0 184.32042718 9.33882968 248.31570215 24.99351522l-20.5400271 170.42014604c-42.56455024-14.33213455-142.32268451-27.50366309-223.07926938-27.50366311-176.25016686 0-325.94134993 52.49717834-343.10752238 218.57179958-15.30380469 148.50358623 89.7715245 219.48948804 288.04621451 219.48948804 69.0155707 0 170.77102691-9.8786464 217.81605614-24.15679928l-16.49140154 162.40386737z"></path></symbol><symbol id="xieboke1" viewBox="0 0 1024 1024"><path d="M204.70021457 751.89799169h657.99199211a33.6932867 33.6932867 0 0 1 0 67.33536736H163.68452703a33.53966977 33.53966977 0 0 1-18.74125054-5.68382181c-18.63883902-9.4218307-18.17798882-29.44322156-15.20806401-39.17228615C199.0675982 570.27171976 309.41567149 409.58853908 435.38145354 290.12586836A243.22661203 243.22661203 0 0 1 536.97336934 234.20935065c138.10150976-33.79569759 228.3257813-29.95527721 318.60125827-28.52152054-17.15387692 20.48224105-36.20236071 41.6301547-57.29906892 62.93168529-3.1747472 3.22595323-164.67721739 19.91897936-187.97576692 47.05794871-23.29854894 27.13896932 129.60138005 7.37360691 125.19769798 11.11161576-21.6599699 18.33160576-44.90731339 36.4071831-69.94685287 53.8682939-4.50609297 3.1747472-149.52035944-0.35843931-174.61110436 27.85584737-25.19315641 28.16308124 101.89914903 18.12678338 96.0617103 21.40394206-67.43777825 37.63611797-125.96578207 64.62147036-212.70807253 93.8086635-57.65750823 19.4069231-121.8181284 133.13456658-146.5504346 179.06599187a435.75967738 435.75967738 0 0 0-23.04252112 49.10617311z" fill="#CA0C16"></path></symbol><symbol id="gitchat" viewBox="0 0 1024 1024"><path d="M892.08971773 729.08552746h-108.597062v-162.89559374H403.40293801v-108.59706198h488.68677972v271.49265572z m-651.58237345 54.298531V783.49265572h488.68678045v108.59706201H131.91028227V131.91028227h760.17943546v217.19412473h-108.597062V240.50734428H240.50734428v542.87671418z m542.98531145 0h108.597062v108.59706199h-108.597062v-108.59706199z" fill="#FF9100"></path></symbol><symbol id="toolbar-memberhead" viewBox="0 0 1303 1024"><path d="M1061.51168438 433.79527648A78.51879902 78.51879902 0 1 1 1129.35192643 472.74060007h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643684 67.133573-80.79584389 67.13357302H319.35199503c-41.30088817 0-76.00619753-28.81639958-80.717325-66.97653526L189.01078861 472.74060007H187.12633728a78.51879902 78.51879902 0 1 1 67.76172401-38.86680556l193.31328323 119.81968805 158.13686148-336.06046024A78.5973179 78.5973179 0 0 1 658.23913228 80.14660493a78.51879902 78.51879902 0 0 1 51.58685077 137.721974l158.13686147 335.82490362 193.54883986-119.89820607z" fill="#FDD840"></path><path d="M1050.8331274 394.22180104a78.51879902 78.51879902 0 1 1 78.51879903 78.51879903h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643684 67.133573-80.79584389 67.13357302H659.02432018C658.47468805 793.25433807 658.23913228 505.32590231 658.23913228 80.14660493a78.51879902 78.51879902 0 0 1 51.58685077 137.721974l158.13686147 335.82490362 193.54883986-119.89820607A78.51879902 78.51879902 0 0 1 1050.8331274 394.22180104z" fill="#FFBE00"></path></symbol><symbol id="toolbar-m-memberhead" viewBox="0 0 1303 1024"><path d="M1062.74839935 433.79527648A78.51879902 78.51879902 0 1 1 1130.58864141 472.74060007h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643685 67.133573-80.79584389 67.13357302H320.58871c-41.30088817 0-76.00619753-28.81639958-80.71732499-66.97653526L190.24750358 472.74060007H188.36305226a78.51879902 78.51879902 0 1 1 67.761724-38.86680556l193.31328324 119.81968805 158.13686147-336.06046024A78.5973179 78.5973179 0 0 1 659.47584726 80.14660493a78.51879902 78.51879902 0 0 1 51.58685076 137.721974l158.13686148 335.82490362 193.54883985-119.89820607z" fill="#D6D6D6"></path><path d="M1052.06984238 394.22180104a78.51879902 78.51879902 0 1 1 78.51879903 78.51879903h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643685 67.133573-80.79584389 67.13357302H660.26103515C659.71140302 793.25433807 659.47584726 505.32590231 659.47584726 80.14660493a78.51879902 78.51879902 0 0 1 51.58685076 137.721974l158.13686148 335.82490362 193.54883985-119.89820607A78.51879902 78.51879902 0 0 1 1052.06984238 394.22180104z" fill="#C1C1C1"></path></symbol><symbol id="csdnc-upload" viewBox="0 0 1024 1024"><path d="M216.37466416 723.16095396v84.46438188h591.25067168v-84.46438188c0-23.32483876 18.90735218-42.23219094 42.23219093-42.23219021s42.23219094 18.90735218 42.23219096 42.23219021v84.46438188c0 46.64967827-37.81470362 84.46438188-84.46438189 84.46438189H216.37466416c-46.64967827 0-84.46438188-37.81470362-84.46438189-84.4643819v-84.46438187c0-23.32483876 18.90735218-42.23219094 42.23219096-42.23219021s42.23219094 18.90735218 42.23219094 42.23219021zM469.76780906 275.55040991L246.55378774 499.53305726a42.30820888 42.30820888 0 0 1-59.99082735 0c-16.56346508-16.62259056-16.56346508-43.57095155 0-60.19354139L480.51167818 144.38144832A42.21952103 42.21952103 0 0 1 512 131.93984464a42.20262858 42.20262858 0 0 1 31.48409853 12.44160369l293.95294108 294.95806754c16.56346508 16.62259056 16.56346508 43.57095155 0 60.19354139a42.30820888 42.30820888 0 0 1-59.99082735 0L554.23219094 275.55040991V680.92876375c0 23.32483876-18.90735218 42.23219094-42.23219094 42.23219021s-42.23219094-18.90735218-42.23219094-42.23219021V275.55040991z"></path></symbol></svg><div>
  <div class="csdn-side-toolbar " style="bottom: 64px !important; left: 1776.5px;">
    
    <a class="option-box" data-type="guide">
      <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/guide.png" alt="" srcset="">
      <span class="show-txt">新手<br>引导</span>
    </a>
    
    
    
    
    <a class="option-box" data-type="cs">
      <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/kefu.png" alt="" srcset="">
      <span class="show-txt">客服</span>
    </a>
    
    
    
    <a class="option-box" data-type="report">
      <span class="show-txt" style="display:flex;opacity:100;">举报</span>
    </a>
    
    
    <a class="option-box go-top-hide" data-type="gotop">
      <img src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/fanhuidingbucopy.png" alt="" srcset="">
      <span class="show-txt">返回<br>顶部</span>
    </a>
    
  </div>
  </div><ins class="adsbygoogle adsbygoogle-noablate" data-adsbygoogle-status="done" style="display: none !important;" data-ad-status="unfilled"><ins id="aswift_0_expand" style="border: none; height: 0px; width: 0px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-table;" tabindex="0" title="Advertisement" aria-label="Advertisement"><ins id="aswift_0_anchor" style="border: none; height: 0px; width: 0px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: block;"><iframe id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;border:0;width:undefinedpx;height:undefinedpx" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" trusttoken="{&quot;type&quot;:&quot;send-redemption-record&quot;,&quot;issuers&quot;:[&quot;https://pagead2.googlesyndication.com&quot;],&quot;refreshPolicy&quot;:&quot;none&quot;,&quot;signRequestData&quot;:&quot;include&quot;,&quot;includeTimestampHeader&quot;:true,&quot;additionalSignedHeaders&quot;:[&quot;sec-time&quot;,&quot;Sec-Redemption-Record&quot;],&quot;additionalSigningData&quot;:&quot;eyJ1cmwiOiJodHRwczovL2Jsb2cuY3Nkbi5uZXQvbXV0aWFuNjY1NS9hcnRpY2xlL2RldGFpbHMvMTE3ODE2NTQyIn0.&quot;}" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/ads.html" data-google-container-id="a!1" data-load-complete="true"></iframe></ins></ins></ins><iframe name="googlefcPresent" style="display: none; width: 0px; height: 0px; border: none; z-index: -1000; left: -1000px; top: -1000px;" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/saved_resource(4).html"></iframe><iframe src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/aframe.html" width="0" height="0" style="display: none;"></iframe><div class="notification" style="position: fixed; left:initial; right: 24px; top: 50px; bottom: initial; z-index: 99999;"></div></body><iframe id="google_esf" name="google_esf" src="./JVM -Xmx内存设置超过物理内存问题思考_明谨的博客-CSDN博客_jvm无法分配内存_files/zrt_lookup.html" style="display: none;"></iframe></html>